3 ms·
> C was created by people that didn't have any extra resource to spend on UX This is irrelevant. The design of a language has little bearing on the quality of
by throw10920 4y ago
> C was created by people that didn't have any extra resource to spend on UX
This is irrelevant. The design of a language has little bearing on the quality of the error messages from any particular implementation. In particular, the constraints on C implementations in the '70s is irrelevant to constraints on implementations in 2023. There's absolutely nothing preventing the GCC/LLVM/ICC/MSVC developers from adding better error messages to their compilers, and the design of the language certainly isn't one.
- 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.