10 ms·
I've heard this from quite a few people, and I believe that it's an experience they're having, but I'm having a hard time understanding it. If you could try to
by ameliaquining 5y ago
I've heard this from quite a few people, and I believe that it's an experience they're having, but I'm having a hard time understanding it. If you could try to give some impression of what you find difficult and how, even it's subjective or fuzzy, I'd appreciate it as a way to get a better understanding.
(Exception: Rust's syntax for closures is terrible and I don't know anyone who defends it.)
- steveklabnik 5y agoRust's syntax for closures is extremely close to Ruby's; the only bad thing about it is that it's extremely close but not identical, hahah. (Only said half seriously. I think the syntax is fine, and possibly the best syntax possible, but understand others may not agree and that's fine.)
- ameliaquining 5y agoOkay, I suppose it has any defenders. I still don't like how || can be either logical-or or the parameters of a nullary closure, especially with move closures since "move" looks like an identifier. Personally, I would have gone with Java's or JavaScript's syntax.
- joezydeco 5y agoI'm not going to get into nitpicking because then it becomes a chain of "well maybe you're too stupid to get it", which I probably am but considering you're hearing from a few people then maybe there's something else going on. For starters, the reference/borrow checking stuff is opaque. The tick is a lousy visual choice of operator as is 'mut'. The idea that some statements need semicolon terminators while others do not? I don't even want to explore what that's about.
- zibzab 5y agoI started learning Go and Rust simultaneously. With Go I was up and running in a week, had real non-trivial projects done in a few months. With Rust it took many months to get started and im still not very productive. Admittingly Rust solves a harder problem. But I think a huge part of this is also Go language and libraries being very well designed, which Rust could learn a few things from. Anyway, why did I mention all that? Because Rust makes me feel "well maybe im too stupid to get it" all the time, and now I have realised that a large portion of that is due to ba design choices made by the Rust team and not my own stupidity.
- srer 5y agoWe largely had similar experiences, but formed different conclusions. Like you, with Go I was up and running rather quickly. I didn't have to think very hard. It was easy because I didn't have to pick up new concepts, only new syntax. With Rust I had to learn some new concepts and internalize them, new concepts I generally find much harder than new syntax, but I believe I became a much better programmer (including when writing Go) as a consequence. Now the journey is majority complete in both languages, and my conclusion isn't that Rust or Go made a pile of bad design choices, rather that the languages made different trade offs that appeal to different people in different circumstances. Go pushes a lot of expectations of behavior during runtime onto the author while writing (don't share mutable state between threads without appropriate care, always remember to manually free your (not memory) resources, don't deref a null pointer, don't use a returned value if err != nil, etc). Rust pushes a lot of expectations of knowledge onto the author while writing just to get the project to compile (ownership, lifetimes, sum types, address all the above mentioned Go expectations). It's been years since I started using both languages, and I've spent months dealing with bugs in Go. I believe a lot of those bugs could have happened in any language, but also a lot wouldn't have made it past rustc. Which is the winner for specific type of situation? I don't think we can know for a long time, studying such things is very difficult and takes a lot of time. In the mean time, we gravitate towards our personal preferences, believing them to be superior for $reasons.
- ameliaquining 5y agoThanks, this is helpful.