Hacker News new | ask | show | jobs
by Androsynth 5095 days ago
Isn't this a problem with any weakly typed language though? This same problem comes up in Perl and php. When you do type coercion, weird edge cases come up.
1 comments

Just because you have weak types does not mean you have to have automatic coercion.
That's actually a widely accepted definition of "weak types": automatic type coercion. That said, "weakly typed" is not a well-defined term and I prefer not to use it.

Note that it is not the same as dynamic types. A dynamic type system is a well-defined concept and says nothing about type coercion.