No such thing as a small change | |
PerlMonks |
Re^4: "strong typing" is potentially ambiguousby dragonchild (Archbishop) |
on Dec 15, 2004 at 14:24 UTC ( [id://415028]=note: print w/replies, xml ) | Need Help?? |
The classical example (forgetting perl for the moment) is a statement like 3.14 + "dog". If we assume that 3.14 is a floating point number, "+" is the addition operator, and "dog" is a string, most people might agree that the statement is meaningless.
*thinks real hard about this* So, if I'm understanding what you're saying and all the links that have been provided ... we could arrive at the following definitions:
So, in your example, the operation '+' isn't defined for the value "dog". However, let's say we had the operation '_' (string concatenation). It would be defined for "dog" ... it could also be defined for "3.14". So, the statement 3.14 _ "dog" could have meaning ... right? I do understand what all the fuss is about re: types ... having a strong type system would eliminate whole classes of bugs, in the way that automatic memory management has eliminated a whole class of bugs. Arguably, it is the Lazier solution to do this. And, I think that some of the people on the lambda site are correct in saying that it's a sociological issue, not a technical one ... sort of. I think I need to think on this topic some more ... Being right, does not endow the right to be rude; politeness costs nothing.
In Section
Perl News
|
|