4 ms·
There was no "design committee" for Rust. I'm increasingly skeptical that any language with lifetimes can be anything other than "ugly to read". People complai
by pcwalton 5y ago
There was no "design committee" for Rust.
I'm increasingly skeptical that any language with lifetimes can be anything other than "ugly to read". People complain about syntax, but what they're really complaining about is semantics.
- fiddlerwoaroof 5y agoThe thing that really surprised me about Rust is the significance of a semicolon at the end of a function body. E.g.: fn foo { 1; } Returns unit while fn foo { 1 } Returns 1. This reminds me of nothing so much as the infamous JavaScript ASI footgun where this returns undefined: function foo() { return 2; }
- c-cube 5y agoIt's not just the function's body, it's any block. Blocks in rust are expressions and return their last statement's value. It's nothing like Javascript's ASI where it's just inserting ; implicitly and only `return` can return a value.
- burntsushi 5y agoIt's also nothing like Javascript because Rust is statically typed. If you accidentally insert a semi-colon (or not), you're almost guaranteed to get a compile error.
- adamnemecek 5y agoThe second function is a syntax error since you are not declaring the return value in the function signature.
- adenozine 5y agoWas? New junk is added to Rust every few weeks, using past tense seems intentionally deceitful, as does re-characterizing my comment. I really do mean ugly as in ugly. That's why I wrote that. One of the strongest factors behind a lot of people choosing to stay away from Rust is that so many conversations with advocates are met with toxic and subtly toxic behavior. They demean software that's not memory safe the way that politicians use their words to sow anger. C has won, and Rust blew it's shot aiming at C++ instead. As Amazon swallows Rust and spits all the refuse out, I can't help but smile, because it's a community that's been begging for obsolescence via their attitudes and behaviors since day one.
- pcwalton 5y agoYou seem awfully angry about programming languages!
- mcronce 5y agoThe Rust community is by a wide margin the most welcoming and positive Internet community I've personally seen. In no small part because they don't make comments like this one.
- platinumrad 5y agoWelcoming? Yes. Positive? I don't know.
- clownpenis_fart 5y agoThey don't make comments like this one, but compensate by being passive aggressive. Until the rust community recognizes and addresses this, they will continue to come across as a bunch of assholes to people who aren't drinking the rust kool aid.