Hacker News new | past | comments | ask | show | jobs | submit login

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.





> 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!


I 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.

It seemed like a high ratio of "non-alphanumeric symbols" compared to a lot of other code that I read and write.

I 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.


The 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.




Guidelines | FAQ | Support | API | Security | Lists | Bookmarklet | Legal | Apply to YC | Contact

Search: