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

Re: -X's auto-(un)quoting?

Thread Previous | Thread Next
From:
Matt
Date:
April 22, 2005 18:55
Subject:
Re: -X's auto-(un)quoting?
Message ID:
op.spnwx8xa8hsiyb@codeslut.kntnny.adelphia.net
On Fri, 22 Apr 2005 21:31:03 -0400, Larry Wall <larry@wall.org> wrote:

>
>     given open 'mailto:matt@weakmind.org' {
>         ^say(...);
>         ^close or fail;
>     }
>
> That almost makes sense, given that $^a is like $_.  It also points  
> vaguely
> upward toward some antecedent.  I could maybe get used to that, if I
> tried real hard for a long time.  Almost makes we wish we could rename
> $_ to $^ though.  Hmm...
>

I think ^ makes the most sense.  I like how it points up.  Like it's  
saying "HEY! THE TOPIC IS UP THERE!"

Though, it IS still a bit odd. It seems more like a modifier on the  
function, than a reference to the topic.

What about . for each level up you want to go?

instead of 1.say, 2.say, 3.say
you use .say, ..say, ...say

(Ok, I'm just kidding.. really!)

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