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!
-
-
Side note: I know *why* that choice was made for web tech, and in hindsight I still think it probably was a reasonable choice.
Show this thread -
But ya I guess the other option would probably be to abort the second you encounter invalid code. Oh god, like imagine Rust without diagnostics. Something went wrong with the borrow checker and you don't get help *why*. Or anything about Pin doesn't work. It'd be soo frustrating
Show this thread
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.