4 ms·
Just to relate this to known concepts, this is basically Type Coercion, aka Implicit Type Conversion, at library level. Or it can be framed as method overloadin
by mmahemoff 14y ago
Just to relate this to known concepts, this is basically Type Coercion, aka Implicit Type Conversion, at library level. Or it can be framed as method overloading with some magic to neutralize the parameters.
http://en.wikipedia.org/wiki/Type_conversion#Implicit_type_conversion http://en.wikipedia.org/wiki/Type_conversion#Implicit_type_c...
I don't think magic like this is out of place with JS; that's the zen of the language. Similarly for Ruby. Whereas in Java or Python, it would be out of place. Now you might use that as an argument against JS, but that's a separate debate.