4 ms·
I agree. Some of the things done in the name of ergonomics just strike me as wrong and/or possibly misleading for learners. People who say Rust is hard to lear
by mark_edward 9y ago
I agree. Some of the things done in the name of ergonomics just strike me as wrong and/or possibly misleading for learners.
People who say Rust is hard to learn have always confused me. I learned programming in this order: scheme, C, C++, Haskell, Rust. I believe that if you go in another order it may make things more difficult, but some of these difficulties are inherent. To me, a reference to a thing is inherently different from the thing, and a systems language should make that clear. I didn't even like auto-deref, I felt like there should be an operator similar to
thing->method()
in C++ that can be chained so that references and indirection would always be syntactically clear and distinct, but the ergonomics on that won out.
- kibwen 9y agoThe change in question wasn't done because of ergonomics, it was done for consistency with the rest of the language. Read about it in the originating PR (which was not linked directly from the blog post): https://github.com/rust-lang/rust/pull/41336 https://github.com/rust-lang/rust/pull/41336
- coldtea 9y ago"People who say Rust is hard to learn have always confused me. I learned programming in this order: (...)" (proceeds to list a quite rare and outlier-ish learning sequence, and all in non-scripting languages to boot). Well, of course those people confused you. What you, who learned Scheme, C++ and Haskell before going to Rust, have in common with someone who only knows C or Java or only got his start in some scripting languages, so as to be able to relate with their "Rust is hard" experience?
- mmstick 9y agoI personally went from Go (slightly mingling with it) -> Rust 1.0 (wrote my first applications with it) and found it to be incredibly easy to learn in comparison to C, C++, Java, and even Python and JavaScript. Everything's pretty explicit and straightforward, and the API documentation and associated resources are stellar.
- Manishearth 9y ago> a systems language should make that clear Folks always say this but never really clarify why this should be the case. When doing low lever unsafe stuff Rust does indeed make it very clear if something is a pointer or not, and avoids weird coercions (even C doesn't do well here!) But for normal code, does it really matter if something is a pointer or not? In C++ already with by-ref and move values and stuff you have implicit pointers in many places that don't behave as pointers. Rust never goes the way of adding implicit allocations or implicit indirection; it only goes in the way of stripping it, which is rarely if ever a problem except when dealing with unsafe code (where Rust is more explicit on pointers anyway).