3 ms·
Who's to say not doing type coercion isn't weird? Every dynamic language treats things slightly differently.
by workinthehead 8y ago
Who's to say not doing type coercion isn't weird? Every dynamic language treats things slightly differently.
- dragonwriter 8y ago> Who's to say not doing type coercion isn't weird? Well, if someone has to do it, I will: not doing type coercion isn't weird, and doing inplicit type coercion (not strict promotion[0]) is both weird and dangerous. But, in any cases that's not really the point. The point is that in this... > Every dynamic language treats things slightly differently. “dynamic” is irrelevant. Languages have a wide variety of approaches, doing promotion, coercion, neither, or both (though where both are done, it's often just called coercion even when it is promotion), and dynamic vs. static is mostly irrelevant. [0] that is, where the “from" type has a range that is a subset of the range of the “to” type.so that there is never a change in meaning resulting from the conversion.