3 ms·
I'm not a Rust user either. It's a lot of "symbol noise" to me, but I assume this is the kind of thing you get used to reading after a while. However it looks v
by nerdponx 7y ago
I'm not a Rust user either. It's a lot of "symbol noise" to me, but I assume this is the kind of thing you get used to reading after a while. However it looks very annoying to type all those symbols, even if you have some kind of customized ergo keyboard.
- anp 7y ago> some kind of customized ergo keyboard I use an ErgoDox, and while my layout isn't customized for writing mox invocations, it hadn't occurred to me that this might be a blind spot in my thinking about ergonomics. Good point!
- WhatIsDukkha 7y agoI didn't really see anything that was weird whatsoever from a normal day to day programmer (Rust or not) perspective so I wouldn't take his feedback to heart or worry about your ergodox.
- nerdponx 7y agoIt seemed like a high ratio of "non-alphanumeric symbols" compared to a lot of other code that I read and write.
- WhatIsDukkha 7y agoI suspect you are keying on some of the Rust language bits in the middle of his syntax. _ is "don't complain because I don't use this variable" || is the syntax around Rust closures foo! is a Rust macro Why this is desirable is that we can program in real Rust while using some simple macro expansion not to create a free standing language for gui building? Learning Rust via this gui library might not be the best choice(?) and I think it's better he focus on people that know Rust already.
- kibwen 7y agoThe code in the OP appears to largely be a custom-built DSL designed to emulate XML. One can tell it's a custom DSL by dint of looking at the `mox!()` invocation; any identifier followed by a bang in Rust is a macro (Scheme-style syntax-aware macros, not C-style textual macros), which have loose parsing rules to allow for such DSLs to be defined. Rust does have plenty of symbols (nearly all of which are lifted directly from C or C++, with the same or analogous meanings), but such extensive DSLs are rarely encountered in the course of everyday use of the language.