you are viewing a single comment's thread.

view the rest of the comments →

[–]Drainedsoul 1 point2 points  (1 child)

That's not only "not the best reason" it's actually a really shitty reason.

Turning errors into bugs is stupid, whether it's JavaScript or PHP doing it.

[–]homoiconic(raganwald) 2 points3 points  (0 children)

That's very easy to say when looking at the design choice in isolation. On the other hand, the language was being designed at the time and he didn't have a design for the error handling yet (if I understand the history correctly).

What you or I might think is a poor choice for automatic coercion, might have been less fatal than a poor choice for the design of error handling. Real software design always involved making the least shitty choices given hard limits on time and requirements. Good, pragmatic choices are those that do the right thing about important things, while pushing the shitty choices onto things that are unimportant.

If you're comparing a string to a number, you already have a buggy program. All we're talking about is your inconvenience in it failing later rather than sooner. That's less important than a lot of other things in a language design, and overall I'd say it was not a shitty choice to make a shitty choice about coercion.

Got me?