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

does anyone else have the feeling the idiosyncratic keywords in rust ("iface"? really?) are there to distract the casual reader from talking about the important stuff?



Such keywords should be designed to decrease typing and reduce collisions in prefixes of other keywords. (Also in the context of code completion.)


Decreasing typing (of keywords) is exactly the wrong way to go when designing a programming language. A program will be read far more times than it is written; the optimization should be towards reading and understanding rather than typing. How long it takes to type should be a distant consideration, if at all.

Often times, a language construct that can be defined in the fewest lines will be more readable. So the end result will generally be a more compact representation. But things like "iface" for interface strikes me as the result of designers who have their priorities mixed up. It's not even an abbreviation, it's just awkward (fn on the other hand has a long history of being an abbreviation for function).


I agree that there are legitimate concerns with some of Rust's keywords, such as the visual similarity between `let` and `ret` (which arguably could just be `return`).

  > But things like "iface" for interface strikes me as the result of designers who have their priorities mixed up.
Disagree with you here. `iface` is no harder to visually parse as "interface" than `&&` is to visually parse as "logical and". You should try using the language and see if it's still a concern after ten minutes. If so, make a posting to the developer mailing list (https://mail.mozilla.org/listinfo/rust-dev) and let them know. The developers do care about pleasing syntax, but be warned that the language is still in such a larval state that they don't really spend much energy bikeshedding.


wait




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

Search: