Re: Cfor loop variations

2002-04-17 Thread Dave Mitchell
On Tue, Apr 16, 2002 at 06:17:24PM -0700, David Wheeler wrote: In Exegesis 4, Damian writes: blockquote It's important to note that writing: for a; b - $x; $y {...} # in parallel, iterate a one-at-a-time as $x, and b one-at-a-time as $y is not the same as writing:

Re: Cfor loop variations

2002-04-17 Thread David Wheeler
On 4/17/02 5:38 AM, Piers Cawley [EMAIL PROTECTED] claimed: I've got the horrible feeling that doing it this way will lead to nasty ambiguities in parsing, but if that's not the case then I must confess that I prefer this syntax. Especially if you want to do something like: for @a, @b ;

named params, @_, and pass-by-reference

2002-04-17 Thread Dave Storrs
On Thu, 11 Apr 2002, Damian Conway wrote: Piers wrote: one could always handle the first case more explicitly by doing: sub load_data ($filename; $version) { $version = 1 if _.length 2; ... } Err...no. If you specify named parameters, you don't get _.

Re: named params, @_, and pass-by-reference

2002-04-17 Thread Jonathan Scott Duff
On Wed, Apr 17, 2002 at 11:15:15AM -0700, Dave Storrs wrote: Perhaps using \ in the signature to indicate p-b-r is not the best...it could confuse people into thinking that they will need to manually dereference the variable, which they shouldn't need to do. Is there a way to do

Re: named params, @_, and pass-by-reference

2002-04-17 Thread Trey Harris
In a message dated Wed, 17 Apr 2002, Dave Storrs writes: sub load_data ( \$filename; $version; _ ) { I think you can do exactly this with sub load_data ( $filename is rw, $version, _ ) { Yes? Or maybe sub load_data ( $filename is rw, $version, *@_) { to make sure _ gets

// in Perl 5.8?

2002-04-17 Thread David Wheeler
Anyone know what the chances are that some enterprising C hacker can/will/did get the // and //= operator into Perl 5.8? Seems like it wouldn't be a huge deal to add, and I'd love to have it sooner rather than later. Regards, David -- David Wheeler AIM:

Re: Cfor loop variations

2002-04-17 Thread Aaron Sherman
On Wed, 2002-04-17 at 11:23, Jonathan Scott Duff wrote: On Wed, Apr 17, 2002 at 01:38:59PM +0100, Piers Cawley wrote: I've got the horrible feeling that doing it this way will lead to nasty ambiguities in parsing, but if that's not the case then I must confess that I prefer this syntax.

Re: Cfor loop variations

2002-04-17 Thread David Wheeler
On 4/17/02 1:20 PM, Aaron Sherman [EMAIL PROTECTED] claimed: This gets ugly when you mix in traditional C for (are we keeping that in Perl6?): Yes, but it's name is changing to Cloop. David -- David Wheeler AIM: dwTheory [EMAIL PROTECTED]

Re: named params, @_, and pass-by-reference

2002-04-17 Thread Dave Storrs
[Several people said something like $var is rw will do it) Ah, that's right. I had forgotten about this. Thanks to everyone who responded. Dave

Re: // in Perl 5.8?

2002-04-17 Thread Dave Mitchell
On Wed, Apr 17, 2002 at 01:09:43PM -0700, David Wheeler wrote: Anyone know what the chances are that some enterprising C hacker can/will/did get the // and //= operator into Perl 5.8? Seems like it wouldn't be a huge deal to add, and I'd love to have it sooner rather than later. I hope

Re: // in Perl 5.8?

2002-04-17 Thread David Wheeler
On 4/17/02 1:51 PM, Dave Mitchell [EMAIL PROTECTED] claimed: I hope you're referring to 5.8.x for some x != 0 ??? :-) Do you know how late in the development process the $coderef-() feature was added to Perl (in whatever release that was)? Ask Randal to talk about it sometime. ;-) But maybe

Re: // in Perl 5.8?

2002-04-17 Thread Graham Barr
On Wed, Apr 17, 2002 at 01:09:43PM -0700, David Wheeler wrote: Anyone know what the chances are that some enterprising C hacker can/will/did get the // and //= operator into Perl 5.8? Seems like it wouldn't be a huge deal to add, and I'd love to have it sooner rather than later. It is not

Re: // in Perl 5.8?

2002-04-17 Thread David Wheeler
On 4/17/02 2:17 PM, Graham Barr [EMAIL PROTECTED] claimed: The problem with // is that it already has a meaning and although perl6 will redefine it can we do so in perl5 ? I don't think we can. Oh yeah, you're right. Perl 5 would have to require that it be m//, and that would break a lot of

RE: // in Perl 5.8?

2002-04-17 Thread Brent Dax
Randal L. Schwartz: # David == David Wheeler [EMAIL PROTECTED] writes: # David Anyone know what the chances are that some # enterprising C hacker # David can/will/did get the // and //= operator into Perl 5.8? Seems # David like it wouldn't be a huge deal to add, and I'd love # to have it #