develooper Front page | perl.perl6.language | Postings from April 2002

Re: Unary dot

Thread Previous | Thread Next
From:
Piers Cawley
Date:
April 10, 2002 11:41
Subject:
Re: Unary dot
Message ID:
m21ydnmm78.fsf@bofh.org.uk
Melvin Smith <mrjoltcola@mindspring.com> writes:

> 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.

Um... don't you use factory methods? I know I do.

-- 
Piers

   "It is a truth universally acknowledged that a language in
    possession of a rich syntax must be in need of a rewrite."
         -- Jane Austen?


Thread Previous | Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About