develooper Front page | perl.perl6.language | Postings from May 2005

Re: ./method

Thread Previous | Thread Next
From:
Abhijit Mahabal
Date:
May 15, 2005 07:38
Subject:
Re: ./method
Message ID:
Pine.LNX.4.62.0505150930370.23958@sluggo.cs.indiana.edu
On Sun, 15 May 2005, Juerd wrote:

> I do think $__ looks too much like $_.

Yeah, lets drop that idea.

> A bit better would be to not have
> a "bigger" topic, but a "higher" topic, $-, but the problem with seeing
> the invocant as a topic on another level, is that
> inconsistency/asymmetry would be introduced between
>
>    method {
>        # topic is object
>        given 5 {
>            # topic is 5
>            # "bigger" topic is object, we access it as $__
>        }
>    }
>
> and
>
>    given $object {
>        # topic is object
>        given 5 {
>            # topic is 5
>            # $object is neither $_ nor $__
>        }
>    }

By "bigger topic" I did not mean "outer topic"; I was thinking that $__ 
can *only* get bound to an invocant.


> You didn't say what you think about ./method; What is your opinion?

I like it. ( I assume you mean:
 	.method   is always $_.method
 	./method  is always $?SELF.method )
Yes, I like it a lot!

--abhijit

Abhijit Mahabal      http://www.cs.indiana.edu/~amahabal/

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