Re: Parsing macros (was: Control flow variables)

2003-11-20 Thread Luke Palmer
Jonathan Lang writes: > Larry Wall wrote: > > So far we've only allowed "is parsed" on the macro itself, not on > > individual arguments. Still, that's an interesting idea. > > Forgive me if this has already been addressed, but this could have some > useful applications: > > So far, everything I

Re: Control flow variables

2003-11-20 Thread Smylers
Larry Wall writes: > And nested modifiers are still quite illegal in Standard Perl 6. Right. Anybody else get the feeling we should write that down somewhere, so we don't have to have this conversation again in a few months? Smylers

Re: s/// in string context should return the string

2003-11-20 Thread Smylers
Piers Cawley writes: > Stéphane Payrard <[EMAIL PROTECTED]> writes: > > > s/// in string context should return the string after substituion. > > Surely it should return the string after substitution, but with an > appropriate 'but true' or 'but false' property depending on whether > anything wa

Re: Control flow variables

2003-11-20 Thread Smylers
Larry Wall writes: > On Wed, Nov 19, 2003 at 08:08:49AM +1100, Damian Conway wrote: > > : Michael Lazzaro wrote: > : > : >return if $a { $a } > : > : Means: > : > :if ($a) { return $a } else { return undef } > > No, it's a syntax error. You must write > > return do { if $a { $a

Re: Control flow variables

2003-11-20 Thread Jonathan Scott Duff
On Wed, Nov 19, 2003 at 12:49:21PM -0800, Larry Wall wrote: > Sorry, I wasn't being very clear. It wouldn't be logically attached to > the outside of the for, but to the inside of the "confer", or whatever: > > @foo = gather { > for @a -> $x { pick $x if mumble($x) } > DEFAULT { @

Re: s/// in string context should return the string

2003-11-20 Thread Jonathan Scott Duff
On Wed, Nov 19, 2003 at 08:23:30PM +, Smylers wrote: > This, however, is irritating: > > my @new = map { s:e/$pattern/$replacement/; $_ } @old; > > I forget the C<; $_> far more often than I like to admit and end up with > an array of integers instead of modified strings. That one gets m

Re: Control flow variables

2003-11-20 Thread Piers Cawley
Smylers <[EMAIL PROTECTED]> writes: > Larry Wall writes: > >> And nested modifiers are still quite illegal in Standard Perl 6. > > Right. > > Anybody else get the feeling we should write that down somewhere, so we > don't have to have this conversation again in a few months? It'll be in the summa

Re: Control flow variables

2003-11-20 Thread Michael Lazzaro
On Wednesday, November 19, 2003, at 12:28 PM, Smylers wrote: Larry Wall writes: : Michael Lazzaro wrote: : : >return if $a { $a } No, it's a syntax error. You must write Excellent! I too was quietly hoping someone would say that. These hurt my admittedly ever-shrinking brain: retur

Re: Control flow variables

2003-11-20 Thread Michael Lazzaro
On Tuesday, November 18, 2003, at 12:15 PM, Luke Palmer wrote: Oh, and if you really want to do that return thing without using a C, you can just: sub blah { return $a || goto CONT; CONT: ... } I don't see what's wrong with that. :-p Umm... refresh my/our memory. Did we

Re: Control flow variables

2003-11-20 Thread Larry Wall
On Thu, Nov 20, 2003 at 11:23:34AM -0800, Michael Lazzaro wrote: : : On Tuesday, November 18, 2003, at 12:15 PM, Luke Palmer wrote: : >Oh, and if you really want to do that return thing without using a : >C, you can just: : > : >sub blah { : >return $a || goto CONT; : >CONT: : >

Anonymous Multi's? [was Re: Control flow variables]

2003-11-20 Thread Dave Whipp
"Larry Wall" <[EMAIL PROTECTED]> wrote: > Also, since multi is orthogonal to naming ... So I'm wondering what the correct syntax is to grab a reference to a group of multi-somethings. Example: multi sub foo(Int $a:) {...}; multi sub foo(String $a:) {...}; my $ref = multi &foo; $ref("hello"); #

Re: Anonymous Multi's? [was Re: Control flow variables]

2003-11-20 Thread Dan Sugalski
On Thu, 20 Nov 2003, Dave Whipp wrote: > "Larry Wall" <[EMAIL PROTECTED]> wrote: > > Also, since multi is orthogonal to naming ... > > So I'm wondering what the correct syntax is to grab a reference to a group > of multi-somethings. While Larry will probably weigh in on this, I'd rather you not a

Re: s/// in string context should return the string

2003-11-20 Thread Luke Palmer
Smylers writes: > Piers Cawley writes: > > > Stèphane Payrard <[EMAIL PROTECTED]> writes: > > > > > s/// in string context should return the string after substituion. > > > > Surely it should return the string after substitution, but with an > > appropriate 'but true' or 'but false' property de

Re: Control flow variables

2003-11-20 Thread Luke Palmer
Jonathan Scott Duff writes: > On Wed, Nov 19, 2003 at 12:49:21PM -0800, Larry Wall wrote: > > Sorry, I wasn't being very clear. It wouldn't be logically attached to > > the outside of the for, but to the inside of the "confer", or whatever: > > > > @foo = gather { > > for @a -> $x { pick