andrewsw posted this comment in the python forum, and it started me thinking about which languages are helpful, and which ones are just mean and ornery. Java and python seem to me the most helpful of the ones I've used - they really go to the mat to give you a precise indication of where they think you stuffed it up.
PHP tries, I suppose, but it's just not very clever and the language is far too permissive, so it's kind of impossible for the error messages to be useful - even if they took the minor step of translating compiler-ese into something more like English.
At the far end, for me, is ml, particularly sml/nj which is the only ml flavor I've really used (aside from Scala). As far as I can tell, ml is a covertly esoteric language, with a degree of randomness built in to the compiler - sometimes it'll pass your code, sometimes not, as it chooses. But the error messages that the compiler provides are almost like it's making fun of you - most of the error message actually points to stuff inside the compiler! It's like it's saying "well, yeah, here's where you have to rewrite the compiler if you want this syntax to pass." But telling you where the syntax is incorrect is almost too much to ask, and telling you what went wrong? That's completely not on.
So what languages/compilers have the most useful or friendly error messages? Which ones make you want to stick a knife into someone?