News for hackers. Stuff that matters.
Re:These are things in PHP which make me sad by thinkcomp on Friday May 27, 2011 @12:42PM (#2592040)
I've definitely run into #1 on the list. "Paamayim Nekudotayim" is a transliterated version of פעמיים נקודתיים‎, which means "double colon" in Hebrew. Zeev and Andi are Israeli, which kind of explains it, but the error message is still pretty useless.
Re:These are things in PHP which make me sad by alanh on Friday May 27, 2011 @03:33PM (#2592774)
Of all these complaints, I’m most forgiving of the name of T_PAAMAYIM_NEKUDOTAYIM. You only need to look it up once; the cost is a few seconds of Googling and the payoff is you learn a fun random fact. It gives the language a bit of color.

Still, glad I’m not doing much PHP anymore.

Re:These are things in PHP which make me sad by phillmv on Friday May 27, 2011 @06:10PM (#2593254)
Actually, I kind of like the feeling that I'm building a golem when working on webapps.
Re:These are things in PHP which make me sad by p4bl0 on Friday May 27, 2011 @12:51PM (#2592094)
This should disappear soon[1], it seems the patch has been accepted (or is on a good way to be), according the internals@ mailing list[2].

[1] https://wiki.php.net/rfc/improved-parser-error-message

[2] http://news.php.net/php.internals/52436

Re:These are things in PHP which make me sad by Leynos on Friday May 27, 2011 @01:03PM (#2592142)
I'm actually surprised it's still there. I remember WTFing at that about four years ago.
Re:These are things in PHP which make me sad by p4bl0 on Friday May 27, 2011 @01:12PM (#2592180)
I think pretty much every single PHP developers feels like you ^^.
Re:These are things in PHP which make me sad by koenigdavidmj on Friday May 27, 2011 @12:43PM (#2592056)
Even in Hebrew, that is a useless error message...token names should mean what the token means, not what it looks like.
Re:These are things in PHP which make me sad by archivator on Friday May 27, 2011 @02:22PM (#2592502)
Presumably, the tokenizer doesn't know anything about the meaning of the tokens it's extracting. It's the parser's job to attach meaning to tokens.
Re:These are things in PHP which make me sad by burgerbrain on Saturday May 28, 2011 @08:57PM (#2595576)
Presumably, the programmers should pick reasonable token names for the sake of other programmers.

They're all just numbers to the tokenizer...

Re:These are things in PHP which make me sad by gburt on Friday May 27, 2011 @12:47PM (#2592069)
For unexpected token I think what it looks like is more valuable. Unfortunately most English PHP developers don't speak Hebrew. =\
Re:These are things in PHP which make me sad by lox on Friday May 27, 2011 @02:09PM (#2592462)
I'm actually quite fond of that particular quirk. At least it's easy to search for!
Re:These are things in PHP which make me sad by user24 on Friday May 27, 2011 @01:22PM (#2592249)
> the error message is still pretty useless.

not at all. A google search for "Paamayim Nekudotayim" gives you thousands of pages relating to exactly the error you're experiencing. It's WAY more useful than "Illegal operation" or "Syntax error".

Re:These are things in PHP which make me sad by generalk on Friday May 27, 2011 @01:42PM (#2592344)

  > It's WAY more useful than "Illegal operation" or "Syntax error".
Wut.

"Syntax error on line 14" -- Okay, time to look at line 14 for a mistyped semicolon or something. These two words Mean Something.

"Unexpected T_PAAMAYIM_NEKUDOTAYIM on line 14" -- means absolutely nothing unless you've already looked it up. It's essentially easily-googleable nonsense. It might as well say "Error 0x444F808E". You can google that, too, and it also tells you nothing useful.

Re:These are things in PHP which make me sad by randallsquared on Friday May 27, 2011 @04:06PM (#2592882)
You would prefer, when encountering an incorrectly used double colon operator, PHP said "Syntax error"? Even when I'm directed to look only at the surrounds of the double colon, it has been difficult to understand the problem in some cases... it looks like valid syntax. Now, you might say that this is a problem with PHP's syntax, and I have no defense against that, but rolling this into "invalid syntax" with no further explanation would cause no end of trouble for those new to OO in PHP.
Re:These are things in PHP which make me sad by eli on Friday May 27, 2011 @04:59PM (#2593042)
Uh, how about "Double colon error" ?
Re:These are things in PHP which make me sad by code_duck on Friday May 27, 2011 @01:53PM (#2592392)
Right, because there are thousands of people going to ask on mailing lists WTF that means. Given the small fraction of developers worldwide who speak Yiddish or Hebrew or whatever, 'double colon' might be a better phrase to use.
Re:These are things in PHP which make me sad by julioc on Friday May 27, 2011 @01:43PM (#2592349)
I still prefer something like "illegal scope operator"
Re:These are things in PHP which make me sad by qeorge on Friday May 27, 2011 @01:00PM (#2592128)
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?

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.

Re:These are things in PHP which make me sad by rudiger on Friday May 27, 2011 @01:13PM (#2592192)
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.
Re:These are things in PHP which make me sad by generalk on Friday May 27, 2011 @01:53PM (#2592393)
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.

Re:These are things in PHP which make me sad by rmc on Friday May 27, 2011 @04:23PM (#2592930)
The rest of PHP is in English. A language should be consistant with itself.
Re:These are things in PHP which make me sad by Someone on Friday May 27, 2011 @07:09PM (#2593380)
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.