Bart Lateur wrote:
> 
> No. I could agree that
> 
>         CGI->somemethod(@args);
> 
> would do exactly the same as
> 
>         CGI::somemethod(@args);
> 
> i.e. no difference between function calls and class methods, unless the
> method explicitely wants to know.
> 
> Why make module authors' life even more miserable?
> 
> Passing the class/object in a magic variable, e.g. $SELF, instead of in
> the arguments list, is one way.

Yikes.  Class method calls should perform inheritance, subroutine calls
should not. Altering the language to make the two look the same is a bad
idea, because it breaks, fatally, as soon as the class supports more
than one object at a time.

Instead of changing the language to make a crufty interface work, the
interface should be changed...

Hildo

Reply via email to