I really like @ekuber's take that a compiler must be able to understand a superset of the language it's implementing.
That's how you can provide useful diagnostics. The compiler understands invalid code, and provides help to turn it to valid code.
Surprising but v true!
-
-
Try out rustc 1.0 you definitely be able to experience this

-
I keep wondering "why didn't I pick up rust sooner" and then think back of trying it in 2015/2016 and remember "oh yeah, that's why".
- 4 more replies
New conversation -
-
-
We spent decades trying to invent a sufficiently smart compiler when we should have been inventing a sufficiently empathetic one
-
I am adopting this motto now
End of conversation
New conversation -
-
-
rust's diagnostics are a huge part of why i'm able to recommend it to people as a language to learn. it's the first language i've ever learned that is not hostile to newcomers, and is actively welcoming.
-
this is compiler's error messages, the book and the community all the way through. like the RFC template having a "how do we teach this" section, it's a language that's designed to be learnable in a way i've never experienced before
End of conversation
New conversation -
-
-
There's another part to keep in mind. Understanding almost correct code is nice for newcomers, *hiding* "unnecessary" errors is nice for everybody.https://github.com/rust-lang/rust/pull/64674#event-2653349729 …
-
Which is of course a balancing act to make the judgement call on whether an error is unnecessary and how conplex to make the codebase to detect those cases.
End of conversation
New conversation -
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.