Automatic Syntax Error Recovery (2020)
5 points by rbr
5 points by rbr
Fundamentally, a system (maybe editor + compiler) that accepts a superset L' of language L, could be replaced with a compiler for L', that superset of the language. But the when "errors" occur, we in a very similar situation ... do we now want a system that accepts L'' (superset of the superset of L)?
And each time we enlarge the superset that we accept, we're increasing the chance that the superset compiler misinterprets our intentions. The consensus seems to be that it's better to be stricter with what we accept, to catch errors earlier, and force the errors to be fixed earlier.
it's better to be stricter with what we accept, to catch errors earlier, and force the errors to be fixed earlier.
That is also my strong feeling. Once you're recovering from an error with heuristics, well, you're just guessing what the user meant. If you wish to know for sure what the user meant you need them to tell you.
I think the intended use as described in the article is reasonable: accept for actual execution only L, but do your best to give useful advice how to get to L from a large neighbourhood of L.
I'm confused why this article uses animations for the error messages instead of just showing the code and the error. Surely the latter would be easier to do, and it would also make the article easier to read. It's a shame, the article itself is pretty interesting.
For the friends using a hardened browser like I am, the animations here rely on WebGL with no fallback logic or error message ^^'