Re: The C Comma

2003-11-25 Thread Jonathan Scott Duff
On Mon, Nov 24, 2003 at 04:40:23PM -0800, Michael G Schwern wrote: On Mon, Nov 24, 2003 at 05:00:38PM -0700, Luke Palmer wrote: my $n; while $n++ then @accum $total { ... } (Where I got in trouble for using Cand and never executing anything :-) To me, it's

Re: The C Comma

2003-11-25 Thread Smylers
Damian Conway writes: Perhaps this is yet another argument for insisting on: while do {$n++; $foo $bar} instead. Yes please! Is anybody here a fan of the C comma? I don't think I've ever used it -- well, not intentionally, anyway -- but these are the situations where I've spotted

Re: Control flow variables

2003-11-25 Thread Piers Cawley
Simon Cozens [EMAIL PROTECTED] writes: Luke Palmer: So modules that introduce new concepts into the language can add new syntax for them without working with (ugh) a source filter. And some of these new syntaxes in the core language will actually be in standard modules, if they're not

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

2003-11-25 Thread Piers Cawley
Jonathan Scott Duff [EMAIL PROTECTED] writes: 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

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

2003-11-25 Thread Mark J. Reed
On 2003-11-25 at 18:17:04, Piers Cawley wrote: aString replace: aPattern with: aString. aString replaceAll: aPattern with: aString. Stop! Stop that at once! No small talk; we're here for serious discussions! :) Except... the second argument isn't strictly a string because it's

Re: Control flow variables

2003-11-25 Thread Luke Palmer
Piers Cawley writes: Simon Cozens [EMAIL PROTECTED] writes: But it isn't, and I don't know why it isn't, and so we end up spending loads of time discussing things that can be punted out to modules. Designing Perl 6 is hard enough; let's not try to fill CP6AN at the same time. But the

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

2003-11-25 Thread Piers Cawley
Mark J. Reed [EMAIL PROTECTED] writes: On 2003-11-25 at 18:17:04, Piers Cawley wrote: aString replace: aPattern with: aString. aString replaceAll: aPattern with: aString. Stop! Stop that at once! No small talk; we're here for serious discussions! :) Except... the second

Re: The C Comma

2003-11-25 Thread Jonathan Scott Duff
On Tue, Nov 25, 2003 at 01:46:39PM -0700, John Williams wrote: On Mon, 24 Nov 2003, Jonathan Scott Duff wrote: or maybe throw some latin in there while $n++ et @accum $total { ... } while $n++ cum @accum $total { ... } # maybe? I think ac is the latin conjunction you

Re: The C Comma

2003-11-25 Thread Luke Palmer
Austin Hastings writes: -Original Message- From: Adam Turoff [mailto:[EMAIL PROTECTED] On Tue, Nov 25, 2003 at 01:03:19PM +1100, Damian Conway wrote: Schwern observed: Perhaps this is yet another argument for insisting on: while do {$n++; $foo $bar}

RE: The C Comma

2003-11-25 Thread Gordon Henriksen
Adam Turoff wrote: Damian Conway wrote: Perhaps this is yet another argument for insisting on: while do {$n++; $foo $bar} instead. That looks like syntactic sugar for while (do) {$n++; $foo $bar} do is not merely prototyped, but a builtin. With a mandatory {}