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) Cmap the list of templates to a list : of curried closures in which the first parameter is fixed to each given : template, (ii) Creduce this list by means of right pipe binop : ( C == ) with a starting value

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,

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 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 ?foo became

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 ?foo became $foo and foo 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

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