Re: How would I do this in Perl6? #1

2004-09-16 Thread Michele Dondi
On Tue, 14 Sep 2004, Matt Diephouse wrote: > Or in Perl 5, which has to use 2 subs to have the same interface (code ^ ^ Huh?!? #!/usr/bin/perl -l use strict; use warnings; sub extp ($@) { my $t=shift;

Re: How would I do this in Perl6? #1

2004-09-16 Thread Michele Dondi
On Thu, 16 Sep 2004, Michele Dondi wrote: > On Tue, 14 Sep 2004, Matt Diephouse wrote: > > > Or in Perl 5, which has to use 2 subs to have the same interface (code ^^^ ^^^

Re: How would I do this in Perl6? #1

2004-09-16 Thread Michele Dondi
On Tue, 14 Sep 2004, Larry Wall wrote: > : So what I would like to do is (i) C the list of templates to a list > : of curried closures in which the first parameter is fixed to each given > : template, (ii) C this list by means of right pipe binop > : ( C<< ==> >> ) with a "starting value" (leftm

Re: [S3, S4, S5]: =~ becomes ~~

2004-09-16 Thread Herbert Snorrason
> Okay, it ought to be there soon. I added it in the "New operators" > section, since it's pretty different from =~. That'd also be appropriate, but I didn't see an explicit mention anywhere... > Arguably the ~~ table should go in S3 instead of S4. It most likely should, since ~~ is an operator,

Re: S5: grammar compositions

2004-09-16 Thread Miroslav Silovic
On Wed, 2004-09-15 at 12:47 -0700, [EMAIL PROTECTED] wrote: > Grammar roles? > > Larry Hmm, actually a few questions on the topic: S5 doesn't specify whether grammars can have attributes. Can they? Can they have methods, or at least local subs, to call from the code within the rules? Can gramma

Still about subroutines...

2004-09-16 Thread Michele Dondi
Speaking of subs, and especially recursive ones which have been mentioned en passant earlier, I have another question "of mine": I know that in the vast majority of cases this won't be useful in any way, but in the body of a (possibly anonymous) sub/block, will there be some sort of identifier to

Re: Still about subroutines...

2004-09-16 Thread Luke Palmer
Michele Dondi writes: > Speaking of subs, and especially recursive ones which have been > mentioned en passant earlier, I have another question "of mine": I > know that in the vast majority of cases this won't be useful in any > way, but in the body of a (possibly anonymous) sub/block, will there >

Re: Still about subroutines...

2004-09-16 Thread Larry Wall
On Thu, Sep 16, 2004 at 10:02:18AM -0600, Luke Palmer wrote: : The new alternative is MY.sub. I suppose that could return the current : actual sub, so if you're using a pointy sub you have to say MY.block or : something. But it's one of those two. Or something resembling them. I'm still pining

Re: Still about subroutines...

2004-09-16 Thread Jonathan Scott Duff
On Thu, Sep 16, 2004 at 10:07:29AM -0700, Larry Wall wrote: > I like $-, $+, and $? the best. Probably should save $- and $+ for something > complimentary, which leaves $?. It's visually distinctive, and recently > came available. :-) Speaking of which ... why is it that $?foo and became $<> a

Re: Still about subroutines...

2004-09-16 Thread Juerd
Jonathan Scott Duff skribis 2004-09-16 13:44 (-0500): > Speaking of which ... why is it that $?foo and became $<> > and <> respectively? perlcheat is one page. I hope that when Perl 6 is around, I can summarize all uses of << and >> on one page. The second page will be for the rest of the synta

Re: Still about subroutines...

2004-09-16 Thread JOSEPH RYAN
- Original Message - From: Juerd <[EMAIL PROTECTED]> Date: Thursday, September 16, 2004 2:55 pm Subject: Re: Still about subroutines... > Jonathan Scott Duff skribis 2004-09-16 13:44 (-0500): > > Speaking of which ... why is it that $?foo and became > $<>> and <> respectively? > > per

Re: Still about subroutines...

2004-09-16 Thread Luke Palmer
Larry Wall writes: > I like $-, $+, and $? the best. Probably should save $- and $+ for something > complimentary, which leaves $?. It's visually distinctive, and recently > came available. :-) Hmm, $& is pretty good, and it's associated with subs mnemonically, just as $= is associated with lin

Re: Still about subroutines...

2004-09-16 Thread Larry Wall
On Thu, Sep 16, 2004 at 01:40:47PM -0600, Luke Palmer wrote: : Larry Wall writes: : > I like $-, $+, and $? the best. Probably should save $- and $+ for something : > complimentary, which leaves $?. It's visually distinctive, and recently : > came available. :-) : : Hmm, $& is pretty good, and

Re: Still about subroutines...

2004-09-16 Thread Larry Wall
On Thu, Sep 16, 2004 at 01:44:03PM -0500, Jonathan Scott Duff wrote: : On Thu, Sep 16, 2004 at 10:07:29AM -0700, Larry Wall wrote: : > I like $-, $+, and $? the best. Probably should save $- and $+ for something : > complimentary, which leaves $?. It's visually distinctive, and recently : > came