4 ms·
Its only a "bug" because there's an unspoken rule that all programming languages should be written in English, and English doesn't have a proper word for this s
by qeorge 15y ago
Its only a "bug" because there's an unspoken rule that all programming languages should be written in English, and English doesn't have a proper word for this symbol.
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?
- rudiger 15y agoIn 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.
- generalk 15y agoOr, 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.
- georgieporgie 15y agoPretend 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.
- jeffreymcmanus 15y agoIt'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.
- rmc 15y agoThe rest of PHP is in English. A language should be consistant with itself.
- Someone 15y agoOK, 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.