On Friday, 28 March 2014 at 18:24:21 UTC, Walter Bright wrote:
On 3/28/2014 2:37 AM, Andrea Fontana wrote:
There's another advantage. If you want to change error message
(or add
localization like in visual c++) you still can found what the
error means.
Completely worthless:
1. Programmers program in English. Yes, I've asked many
international shops about this. They want error messages in
English.
Good to know. I don't like l10n of messages but many app simply
use os default language. I hope it doesn't happen then.
2. The internationalized messages are *terrible* because you
need a person who is fluent in that language, and in compilers,
to write them. That just doesn't work out too well in practice.
3. Every time you add/change an error message to the compiler,
then you have to go back to (2) and try to deal with that.
Never works, or you get crappy translations, meaning (1) the
foreign programmers again prefer the English messages.
I.e. been there, done that. Translated messages are great for a
lot of apps, but not for programming tools.
I agree with you about english and programming. My point was to
show you that there are cases where error codes are useful.
(however it's not that difficult to translate a message in your
own native language)
It should be easier for IDE to parse and give suggestions or
redirect to an help
page to solve the problem.
The IDE doesn't have to parse them. All it has to do is do a
substring search. The IDE developer would have to provide the
patterns to search for, but that isn't any harder than creating
an indexed table.
I disagree here.
1) If you want to google for error, you have to strip extra info
(line, symbols, etc)
2) It happens that you search for an error and you find error
from another compiler.
3) Error messages can be wrong or not well-written (they can
contains typos). If you change their description to make them
clear you have to change the pattern.
And if you want to change the format of error messages (let's
say: add line/column/demangling symbols/giving hints/...) you'll
probably brake ide parsers. It's quite different if IDE just
needs to read the first word of line or first match "DPL[0-9]{5}".
4) Don't know if this is a case, but two errors can have similar
descriptions and googling for an error could drive user to the
wrong one
5) Why a central map "string code" => "error message" should be
harder to mantain than a lot of messages putted around the source
code?