[ Flawed premise: I was working from an incorrect definition of coercion. ]
I agree; that's why I try to prefer the term "coercion". Coercion is not the same thing as conversion. How can you coerce the choice of operators if the operator is monomorphic? There can't be coercion for monomorphic operators since there is nothing to coerce.
There are two "=" operators, and you can coerce the choice of assignment operators.
but what's the difference between:
In one, you used ->to_int (explicit conversion), in the other you didn't (implicit conversion). No coercion occurs since neither subs nor the "+" operator are polymorphic in Perl.
In reply to Re^10: Strong typing and Type Safety.A multilanguage approach (implicit)
by ikegami
in thread Strong typing and Type Safety.A multilanguage approach
by nikosv
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |