When your system gets to a certain size, this is absolutely fatal. Please halt and throw a massive exception, shrugging and carrying on makes bugs impossible to track down and the whole system unpredictable.
It’s a philosophy that might be acceptable for a simple-ish frontend, but when if you try and build something significant it’s just awful.
Source: I inherited responsibility for a > 5m LOC system written in JavaScript. The problems aren’t all JavaScript’s fault, but it does play a major part in it.
A case I'm struggling with recently is Fastmail mail search. Given a valid query which it cannot handle, rather than show an error report, it does its "best" and delivers a false result. With potentially great cost to the unwitting user. Is there even a warning on the doc page?? No.
Yes, Java has this one strong inconsistency on its type system. The interesting thing is that the addition operator has a not completely predictable behavior exactly because the language designers insisted that custom operators reduce the language predictability.
But anyway, it's much less bad in Java because you can force it to err by declaring what type of thing you want it to return.
1 + "five" is an error in PHP, not some random correct-looking value.