4 ms·
> The design of a language has little bearing on the quality of the error messages Actually, it has a lot to do with it. https://www.digitalmars.com/articles/
by WalterBright 4y ago
> The design of a language has little bearing on the quality of the error messages
Actually, it has a lot to do with it.
https://www.digitalmars.com/articles/b47.html https://www.digitalmars.com/articles/b47.html
- throw10920 4y agoThe only point that that article makes that supports this point appears to be "semicolons in the syntax of a language can improve error messages". I don't think that that generalizes, especially because the topic of this comment thread is about C, which already has semicolons, and compilers explaining semantic problems to developers, as opposed to syntactic problems.
- gavinhoward 4y agoCurrently writing a compiler that I want to be production strength, so I read your article. Thank you! It's interesting that your specifically call out that putting source lines in is not good when most modern compilers seem to be moving the other direction and putting them in. Do you think it could be a preference thing? Would it be good to have the option for the user to turn it on? Also, thanks for the tip on the spell checker. That is something I'll add. You said they your just used the current symbol table as a dictionary in another comment; that is a great idea too.
- JonChesterfield 4y agoD putting some container types in the language instead of the library is really interesting in this respect. The usual C++ experience of getting compiler failures in some iterator nested within unordered_map is thus avoidable.