Re: RFC 127 (v1) Sane resolution to large function returns

2000-09-05 Thread Chaim Frenkel
> "GL" == Glenn Linderman <[EMAIL PROTECTED]> writes: GL> Chaim Frenkel wrote: >> ($foo, $baz, @bar) = (1,(2,3),4) # $foo = 1 $baz=2, @bar=(3,4) >> >> Actually, looking at it like that makes it an ugly situation. The 'new' >> expectation would be to have it become >> # $foo=1 $baz=2 @bar=(4)

Re: RFC 179 (v1) More functions from set theory to manipulate arrays

2000-09-05 Thread John Porter
David L. Nicol wrote: > > For sets, hashes are a better perl representation. I think you must have missed some of this discussion. Rather than reiterate my contributions, I'll point you into the archive: http://www.mail-archive.com/perl6-language%40perl.org/msg03425.html http://www.mail-

Re: RFC 179 (v1) More functions from set theory to manipulate arrays

2000-09-05 Thread David L. Nicol
> > =head1 ABSTRACT > > When programming in perl we need really often to calculate > union, intersection, difference between arrays. It will be > cool if such functions could be part of the perl6 language. Arrays/Lists are ordered, sets are not. For sets, hashes are a better perl representati

Re: Change "($one, $two)=" behavior for optimization? (was Re:RFC 175 (v1) Add C keyword to force list context (likeC))

2000-09-05 Thread David L. Nicol
Peter Scott wrote: > > At 11:48 AM 9/3/00 +1100, Damian Conway wrote: > >> Ever consider then having > >> > >> ($a, $b, $c) = ; > >> or > >> @a[4,1,5] = ; > >> > >> only read three lines? > > > >I think this is a superb idea, and look forward to someone's RFC'i

Re: Change "($one, $two)=" behavior for optimization? (was Re: RFC 175(v1) Add C keyword toforce list context (like C))

2000-09-05 Thread Damian Conway
> > A scalar context C would also need to DWIM, presumably by returning > > "0, but true" in that (unusual) situation. > > Actually, given Damian's and my conversations last night, it looks like > the first return arg from want() is going to be the context after all > (since the

Re: RFC 130 (v5) Transaction-enabled variables for Perl6

2000-09-05 Thread Bart Lateur
On Tue, 5 Sep 2000 10:48:45 +0200, dLux wrote: >/--- On Mon, Sep 04, 2000 at 07:18:56PM -0500, Greg Rollins wrote: >| Will perl monitor the commit and rollback actions of transactions? >\--- > >What exactly you mean? And did you have to quote 500+ lines of the RFC just to add this one sentence?

Re: Change "($one, $two)=" behavior for optimization? (was Re: RFC 175 (v1) Add C keyword toforce list context (like C))

2000-09-05 Thread Bart Lateur
On Wed, 6 Sep 2000 05:33:27 +1100 (EST), Damian Conway wrote: >A scalar context C would also need to DWIM, presumably by returning >"0, but true" in that (unusual) situation. I don't understand the existence of that phrase, and the fact that it doesn't give a warning when used in numerical cont

Re: Change "($one, $two)=" behavior for optimization? (was Re: RFC 175(v1) Add C keyword toforce list context (like C))

2000-09-05 Thread Nathan Wiger
Damian Conway wrote: > >> >if ( ($num_to_return) = want 'LIST' ) { >> > # do stuff >> >} >> >> $num_to_return would be zero, but the assignment would cause the >> if() to be true. > > A scalar context C would also need to DWIM, presumably by retu

Re: Change "($one, $two)=" behavior for optimization? (was Re: RFC 175 (v1) Add C keyword toforce list context (like C))

2000-09-05 Thread Damian Conway
> >if ( ($num_to_return) = want 'LIST' ) { > > # do stuff > >} > > And more correct as I would assume that > > () = some_func(); > > $num_to_return would be zero, but the assignment would cause the > if() to be true. A scalar context C

Re: Change "($one, $two)=" behavior for optimization? (was Re: RFC 175 (v1) Add C keyword toforce list context (like C))

2000-09-05 Thread Graham Barr
On Tue, Sep 05, 2000 at 11:16:48AM +1100, Damian Conway wrote: >> By RFC 21, it looks like the call would be >> >>if ( want 'LIST' ) { >> $num_to_return = want; >> # do stuff >>} > > or, more efficiently: > >if ( ($num_to_return) = want 'LIST'

Re: RFC 130 (v5) Transaction-enabled variables for Perl6

2000-09-05 Thread dLux
/--- On Mon, Sep 04, 2000 at 07:18:56PM -0500, Greg Rollins wrote: | Will perl monitor the commit and rollback actions of transactions? \--- What exactly you mean? dLux -- This message is READ-ONLY