Teaching syntax with Elm 0.19.1 ↦
This release and associated announcement post came back in October, but a) I must’ve missed it, and b) it’s conceptually cool enough to share even now. Evan Czaplicki:
… with the release of Elm 0.19.1 today, I am excited to share the new and improved syntax error messages! My hope is that the new compiler feels more like a teacher, showing helpful and relevant examples when you get stuck.
The remainder of the post shows some examples of how this looks in practice. One aspect of this that is odd/interesting is the compiler uses first-person perspective. It says things like:
Declarations always start with a lower-case letter, so I am getting stuck here
I was partway through parsing a record type, but I got stuck here
Maybe it’s always done this, or maybe this is new? I dunno, but it definitely makes it feel a whole lot more personal and friendly this way. Evan and the Elm team are really pushing the world of language compilers in a great direction. I’m excited to see where it all leads.
Sign in or Join to comment or subscribe