Hacker News new | ask | show | jobs
by estebank 2157 days ago
Approaching this from the opposite side, language designers should also take into account how code with slight mistakes (typos and confused use of features) could be detected. Sometimes adding small things to the grammar can pay a lot of dividends when writing the production ready compiler. Alternatively when adding a new feature they should be thinking "what common mistakes will be made to produce worse errors if we introduce this with this syntax".
1 comments

I think in some cases they do. Python3’s parser can detect when people use the old print syntax for example.