Hacker News new | ask | show | jobs
by dozzie 2891 days ago
I know you'd happily bash PHP author for such an incomprehensible error message, but it's not his own message, but something that comes from Yacc/Bison, when the next parsed token is not what can legally follow whatever the parser read up until now. It's just the tokens (or maybe just this one; I haven't read the grammar) were not named in currently canonical English.
2 comments

It is, notably, just that one. If everything were in Hebrew, I would personally be perfectly happy to adjust. But being the only non-English token makes it a completely unnecessary source of cognitive load in a language that is already criticized for its standard library’s frequently inconsistent use of grammar.
It wasnt formulated nicely, I grant you that. PHP bashing is easy even if the language caused big upsides for a lot of people.

But a developer is responsible for the consequences of his choices. If you name your tokens in Hebrew with consequences for error messages, you know you're gonna raise some eyebrows and cause pain for your colleagues.

The simple fact that the message is in this list proves that I am not alone with this opinion.