Re:These are things in PHP which make me sad
by jeffreymcmanus on Friday May 27, 2011 @01:18PM
(#2592222)
It's not an unspoken rule, it's an established convention.
This isn't about whether we use English or not, or whether that's the right choice or not, it's about consistency. If you want to create a language that has all-Hebrew tokens and error messages, knock yourself out. Just do it consistently.
In this case, the Hebrew word literally is T_DOUBLE_COLON, so not much is gained by its use. Perhaps reporting an "unexpected scope resolution operator" error would be better.
Or, even better:
"Unexpected '::' on line 14."
I wouldn't want to see "Unexpected key/value delimiter" (=>) or "Unexpected opening of new scope" ({). Just show the character(s) you found you weren't expecting.
The rest of PHP is in English. A language should be consistant with itself.
OK, let's pretend that. Then, we have someone designing a programming language with English keywords that uses a token for which English does not have a name (not merely a well-known name, not even an obscure one, but no name at all)
IMO, that would only be a good idea when taking part in a obfuscated programming language context.
Re:These are things in PHP which make me sad
by georgieporgie on Friday May 27, 2011 @01:16PM
(#2592207)
Pretend that English had no representation of an ellipsis, but Hebrew did. Should the language author say "Expected: dot-dot-dot"
Yes. It's not about appeasement, it's about consistency.
Pretend that English had no representation of an ellipsis, but Hebrew did. Should the language author say "Expected: dot-dot-dot" in the error message to appease native English speakers, or should (s)he use the unambiguous form?