<?xml version="1.0" encoding="windows-1252"?>
<node id="221622" title="Re: Re^3: $bad_names eq $bad_design" created="2002-12-21 08:06:26" updated="2005-07-27 17:36:21">
<type id="11">
note</type>
<author id="171588">
BrowserUk</author>
<data>
<field name="doctext">
&lt;p&gt;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. 
&lt;p&gt;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. 

&lt;p&gt;You could view this type of failure (or lack of failure:) under the heading &lt;i&gt;caveat implementor&lt;/i&gt; as with some much of standard perl stuff.

&lt;p&gt;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.
&lt;hr&gt;
&lt;font size=1&gt;
&lt;p&gt;Examine what is said, not who speaks.&lt;/p&gt;&lt;/font&gt;</field>
<field name="root_node">
221498</field>
<field name="parent_node">
221619</field>
</data>
</node>
