4 ms·
I can learn any language in a day or two. And become proficient in it in a week. Big part of mastering is less about knowing the language and knowing its plumb
by Ygg2 6y ago
I can learn any language in a day or two. And become proficient in it in a week.
Big part of mastering is less about knowing the language and knowing its plumbing. Quirks, unique behavior, library, tooling, etc.
Dynamism is a constant source of pain. Because it makes tooling and thus exploring language harder.
In Rust there is little such dynamism. Actual problems understanding are macros and proc macros. And finding the right Trait.
Tooling around Rust is standarized. You have cargo, rustc and they bring in the rest.
While there is some chance of Rust going nuts and adding some bizzare thing like inheritance, HKT++,
the chance that it will reach cognitive complexity of Scala or C++ is lesser.
- Decabytes 6y agoI program in Python by day. Racket is probably the language I know best after Python, then maybe Groovy. I've had exposure to R, C, C++, D, Java, Common Lisp etc, and I find it easier to pick up new languages due to my familiarity. While Rust has all the constructs that I'm used to from these other programming languages, I find Rust to be the most difficult one for me to learn in recent memory. The documentation is great, the book is great, the tooling with Cargo is great, but after getting through the first 15 chapters in the Book I struggled to write a program that had any sort of complexity. Sure I can add a dependency super easily to my project, but figuring out what errors everything in the library throws takes a lot of work. Sometimes I get confused about using panic!, expect, unwrap, or ? when I'm writing my own functions or interfacing with others. Swimming through the myriad of traits on different structs is confusing, and I sometimes get tripped up passing closures. And don't get me started on Macros, with great shame, they still have not clicked for me, in Lisp, or in Rust. The language just feels very different from what I'm used to, and I've never had such a hard time getting code I've written to compile correctly. I'd be totally lost without all the help from the subreddit and the book, and I appreciate everyone who has helped me. I know this will get easier... and it has. But it will take longer for me to get comfortably with Rust then it has for other programmings languages in the same time period. This is not to say that it's a bad language. I remember one day after having debugged a Python issue that ended up being a stupid logic error on my part I exclaimed "I wish I knew a programming language that would save me from myself". I think... Or rather I hope Rust is that language in the long term for me
- sanxiyn 6y ago> The language just feels very different from what I'm used to The reason it feels very different is... because it is very different. Then why does it feel off? Because, while it is very different, it doesn't look very different. Then why doesn't it look very different, when it is very different? That's because, Rust developers spent conscious effort to make Rust look similar. So feeling something is off with Rust is the result of intentional design of Rust developers. In a sense this is dishonest and deceiving, but Rust without similarity engineering would be considerably less popular and hence less successful. Rust's ambition was to change the world, not simply to discover a way to change the world and leaving actual changing to others. (Although changing the world requires discovery first.) So Rust chose to "lie". As an example, Rust's assignment(=) looks similar, but works very different. In fact, since it is very different, it was originally written <-. It was changed to = specifically to make it look similar.
- Izkata 6y ago> it was originally written <-. It was changed to = specifically to make it look similar. That's actually kinda disappointing, I use <- in my pseudocode. (I don't know Rust though, so I can't comment on their choice for the language)
- sanxiyn 6y agoAnother example is std::mem::swap. In the world of affine type system which Rust uses, swap is a primitive on an equal footing with assignment (which is actually called move). So naturally, move was written <-, and swap was written <->. But <-> weirded people out, and people complained why Rust has so many special and strange operators. So Rust developers made it look similar to a library function. But it still is a primitive: it is impossible to implement swap yourself in safe code. The result is that people use swap much less than they should, either because they are not aware of it, or because they think it is a specialized library function for special cases. This is significant and large cost. But it is still less than cost of looking weird. All because people won't even try languages with <->. Alas.
- nandhinianand 6y ago