3 ms·
Take for instance http://cglab.ca/~abeinges/blah/too-many-lists/book/README.html http://cglab.ca/~abeinges/blah/too-many-lists/book/README.ht.... I could feel t
by blub 9y ago
Take for instance http://cglab.ca/~abeinges/blah/too-many-lists/book/README.html http://cglab.ca/~abeinges/blah/too-many-lists/book/README.ht.... I could feel the frustration when reading those compiler errors.
I mean it's a list, one of the simplest data structures to implement, I was doing that stuff in high-school.
But it's not just about a particular example, instead I get a general feeling of inaccessibility when reading Rust code. It's not enough to know C or C++, one has to understand the Rust way. This might seem unfair to complain about, but I didn't have any such issues when learning e.g. Swift or Objective-C, to give an example of non-GC languages.
- steveklabnik 9y agoSide note, we have completely re-done the format of compiler errors since that was published. To take a random example from 2.1: src/first.rs:1:1: 4:2 error: illegal recursive enum type; wrap the inner value in a box to make it representable [E0072] src/first.rs:1 pub enum List { src/first.rs:2 Empty, src/first.rs:3 Elem(T, List), src/first.rs:4 } error: aborting due to previous error is now error[E0072]: recursive type `List` has infinite size --> src/main.rs:1:1 | 1 | pub enum List { | ^^^^^^^^^^^^^ recursive type has infinite size 2 | Empty, 3 | Elem(i32, List), | ----- recursive without indirection | = help: insert indirection (e.g., a `Box`, `Rc`, or `&`) at some point to make `List` representable Users have reported a lot less frustration after these changes, and we're always trying to make them better. For more on this effort https://blog.rust-lang.org/2016/08/10/Shape-of-errors-to-come.html https://blog.rust-lang.org/2016/08/10/Shape-of-errors-to-com...
- marcosdumay 9y agoI'd like to thank you a lot for those error messages. As somebody learning the language, they are incredibly helpful.
- steveklabnik 9y agoI will tell that to the people who actually did said work, I'm sure they will appreciate it :D