At 10:50 AM 4/10/2002 -0700, Glenn Linderman wrote:
>"Mark J. Reed" wrote:
> >
> > On Wed, Apr 10, 2002 at 10:30:25AM -0700, Glenn Linderman wrote:
> > > method m1
> > > {
> > >    m2;  # calls method m2 in the same class
> > Yes, but does it call it as an instance method on the current invocant
> > or as a class method with no invocant?  If the former, how would you
> > do the latter?
>
>Should both be allowed to exist?  Do both exist?  Why do both exist?
>(with the same name).  If only one exists, then that would be the one
>that gets called.

I'd hope it would assume "instance" method until told otherwise,
since static methods (class methods) are seldom used in OOP.

Also there are issues when just assuming if m1() is a class method,
I call m2() as a class method because m2() may access instance
data that wouldn't exist if it were called staticly.

-Melvin


Reply via email to