On Wed, Apr 10, 2002 at 03:49:44PM -0400, Mark J. Reed wrote:
> On Wed, Apr 10, 2002 at 02:42:58PM -0500, Allison Randal wrote:
> > > I like the following, assumed to be within method m1:
> > > 
> > > ..m2();      # call m2 the same way m1 was called, instance or class
> > 
> > This has already been semi-rejected. I agree with the reasoning. Not
> > that it wouldn't be nice to have a way to code the concept, just that
> > the ".." symbology isn't right for the job.
> MUA/MTA quoting seems to be getting in the way here - someone's prepending a
> '.' to avoid sending the SMTP end-of-message sentinel and it's not getting
> stripped off properly.  That was supposed to be a single '.' in front of
> the m2().  

Then, Agreed.

> In other words, unary . is the same as binary . with $_ as the LHS, so
> .m2() would be the same as $_.m2(). Which would have the semantics in
> my comment above, 

Yes, until you used a C<given> or a C<for>, etc. Then .m2() would be the
same as $_.m2() (at least it would be if we don't make any of the
changes we're talking about), but wouldn't be called the same way m1 was
called, it would be called on the current topic.

> assuming that the class becomes the topic in static methods.

Larry Wall wrote in A4:
> > Any method definition is a topicalizer within the body of the
> > method, and will assume a "given" of its $self object (or whatever
> > you have named it).

I would hope that static methods wouldn't be *too* different from
instance methods.

Allison

Reply via email to