note adrianh <blockquote><em>As with the rest of Perl's object system, inheritance of one class by another requires no special syntax to be added to the language.</em></blockquote> <p>Inheritance didn't need extra syntax (it's just assigning to <code>@ISA</code>). Method invocation did.</p> <blockquote><em>The -> operator denotes a referance, which has plenty of use outside OO. In this case, were referancing a subroutine from a bless'd variable. I'm not sure about SUPER::.</em></blockquote> <p>Well, since references and OO came along in the same release you could argue that the syntax needed to be added for OO ;-)</p> <p>While the lexical item "->" is the same, the syntax for <code>$object->method</code> is different from <code>$arrayref->[...]</code>, <code>$hashref->{...}</code>, etc. It needed to be added for OO (just as we got <code>$coderef->(...)</code> syntax added in 5.003_98 - as the result of a bet I seem to recall)</p> <p>While something like indirect object syntax was around in perl4 (witness <code>print FILEHANDLE</code>) I think it disingenuous to call it the same syntax as <code>method $object</code> and <code>method Package</code> - hacking of the parser was necessary.</p> 237665 237892