in reply to Re^3: $bad_names eq $bad_design
in thread $bad_names eq $bad_design
First, it should really be eq rather than ==, but I'm not yet sure which operators perls overloading can handle, not having made any use of it, but the example was intended as pseudo code rather than anything anyone would implement.
That aside, I do agree that overloading needs to be used with care, but I wouldn't consider equality testing abitrary semantics. I can however see your point in this regard given a non-implemented method, though it would rapidly show up in testing. The alternative would be to require that objects implement (even if only dummy) methods for the common operators, but that smacks of Java exceptions and is completely against the spirit of Perl.
You could view this type of failure (or lack of failure:) under the heading caveat implementor as with some much of standard perl stuff.
I'm not really sure to which extreme I would tend. I need more time using perl and to read more opinions before I could make that choice.
Examine what is said, not who speaks.