Re: RFC: [] as the solitary list constructor

2002-10-09 Thread Mark J. Reed
On 2002-10-08 at 17:15:06, Larry Wall wrote: > Seriously, () is just a special token. We could easily have used a > special token like NULLLIST instead. What does INTERCAL use? Well, INTERCAL doesn't have lists per se, but it does have arrays, whose size is set by assignment: the lvalue is the n

Re: RFC: [] as the solitary list constructor

2002-10-08 Thread Chip Salzenberg
According to Larry Wall: > On Sat, 5 Oct 2002, Chip Salzenberg wrote: > : I rather like Perl 5's scalar comma operator. > > Most of the uses of which are actually in void context [...] I didn't realize you were distinguishing scalar from void in this, uh, context. I agree that scalar comma is e

Re: RFC: [] as the solitary list constructor

2002-10-08 Thread Larry Wall
On Sat, 5 Oct 2002, Chip Salzenberg wrote: : According to Larry Wall: : > I suppose we could make comma merely puke in scalar context rather : > than DWIM, at least optionally. : : I rather like Perl 5's scalar comma operator. Most of the uses of which are actually in void context, where it does

Re: RFC: [] as the solitary list constructor

2002-10-08 Thread Larry Wall
On Sun, 6 Oct 2002, Trey Harris wrote: : In a message dated Sun, 6 Oct 2002, Noah White writes: : > On Sunday, October 6, 2002, at 01:50 AM, Brent Dax wrote: : > : > > Parens don't construct lists EVER! They only group elements : > > syntactically. One common use of parens is to surround a : >

Re: RFC: [] as the solitary list constructor

2002-10-08 Thread Larry Wall
On 6 Oct 2002, Smylers wrote: : Do parens still provide list context on the left side of an assignment? Er, kind of. More precisely, use of parens on the left provides a flattening list context on the right side, just as in Perl 5. I guess I did not make clear that a basic Perl 6 design decisio

Re: RFC: [] as the solitary list constructor

2002-10-06 Thread John Williams
On Sun, 6 Oct 2002, Luke Palmer wrote: > > Do parens still provide list context on the left side of an assignment? > > What do these two do: > > > > my $x = @ARGS; > > my ($y) = @ARGS; > > > > Parens just grouping suggests that C<$x> and C<$y> should be the same > > (which may well be good, a

Re: RFC: [] as the solitary list constructor

2002-10-06 Thread Glenn Linderman
Larry Wall wrote: >I cringe every time someone says "Parens construct lists in Perl 6." >Parens don't construct lists in Perl 6. > >: Additionally, parentheses have one inconsistency which brackets do not: >: This is the following case, already shown on perl6-language: >: >: $a = ();

Re: RFC: [] as the solitary list constructor

2002-10-06 Thread Smylers
Luke Palmer wrote: > > my $x = @ARGS; > > my ($y) = @ARGS; > > Maybe:? > > my ($y) ^= @ARGS; Or (presumably equivalently): my $y ^= @ARGS; But that's horrible. Presumably with two or more variables the comma would denote list context, so the caret is only needed for exactly one

Re: RFC: [] as the solitary list constructor

2002-10-06 Thread Luke Palmer
> Do parens still provide list context on the left side of an assignment? > What do these two do: > > my $x = @ARGS; > my ($y) = @ARGS; > > Parens just grouping suggests that C<$x> and C<$y> should be the same > (which may well be good, as it's a subtle distinction which trips up > many beginn

Re: RFC: [] as the solitary list constructor

2002-10-06 Thread Smylers
Larry Wall wrote: > Parens don't construct lists in Perl 6. They merely group. > The only difference from Perl 5 is that if they happen to group a > comma in scalar context, the comma acts differently, not the parens. Do parens still provide list context on the left side of an assignment? What

Re: RFC: [] as the solitary list constructor

2002-10-06 Thread Trey Harris
In a message dated Sun, 6 Oct 2002, Noah White writes: > > On Sunday, October 6, 2002, at 01:50 AM, Brent Dax wrote: > > > Parens don't construct lists EVER! They only group elements > > syntactically. One common use of parens is to surround a > > comma-separated list, but the *commas* are cre

Re: RFC: [] as the solitary list constructor

2002-10-05 Thread Noah White
On Sunday, October 6, 2002, at 01:50 AM, Brent Dax wrote: > Parens don't construct lists EVER! They only group elements > syntactically. One common use of parens is to surround a > comma-separated list, but the *commas* are creating the list, *not* the > parens! > Following this rule would m

RE: RFC: [] as the solitary list constructor

2002-10-05 Thread Brent Dax
Noah White: # I think needless obfuscation is treating $a = (10); as a # scalar instead # of a list reference containing one item when the rest of the the $a = # () are list references. I think needless obfuscation is treating $a = (10) differently than $a = 10. The latter is the behavior we'

Re: RFC: [] as the solitary list constructor

2002-10-05 Thread Luke Palmer
Larry Wall wrote: > > [ Stuff about how commas construct lists, not parens ] > Wow, somehow you've convinced me that all the problems I saw before aren't really there. Well, switch on the light, there's no monsters under the bed afterall. > : This has the added benefit that there is a significa

Re: RFC: [] as the solitary list constructor

2002-10-05 Thread Noah White
On Saturday, October 5, 2002, at 09:33 PM, Larry Wall wrote: > > > : Additionally, parentheses have one inconsistency which brackets do > not: > : This is the following case, already shown on perl6-language: > : > : $a = ();# $a is a list reference with 0 elements > : $a = (10);

Re: RFC: [] as the solitary list constructor

2002-10-05 Thread Chip Salzenberg
According to Larry Wall: > I suppose we could make comma merely puke in scalar context rather > than DWIM, at least optionally. I rather like Perl 5's scalar comma operator. > : $a = ();# $a is a list reference with 0 elements > : $a = (10); # $a is the scalar 10 > : $a

Re: RFC: [] as the solitary list constructor

2002-10-05 Thread Larry Wall
On Tue, 24 Sep 2002, Luke Palmer wrote: : =head1 TITLE : : Square brackets are the only list constructor : : =head1 VERSION : : Maintainer: Luke Palmer <[EMAIL PROTECTED]> : Date: 24 Sep 2002 : Number: 362 (?) : Version: 1 : : =head1 ABSTRACT : : This RFC responds to the fury on perl6

RE: RFC: [] as the solitary list constructor

2002-09-25 Thread [EMAIL PROTECTED]
From: Luke Palmer [EMAIL PROTECTED] > [snip] Luke, thanks and congratulations on a well written case. You put into words exactly what I was trying to put into words myself. Now I don't have to finish this ugly draft I have lying around. -Miko --

Re: RFC: [] as the solitary list constructor

2002-09-25 Thread Janek Schleicher
Luke Palmer wrote at Wed, 25 Sep 2002 00:09:41 +0200: Very good written text. > =head1 DESCRIPTION > > Because of the addition of the flattening operator, parentheses in Perl 6, > when used as list constructors, are entirely redundant with brackets. > Additionally, parentheses have one incons

RFC: [] as the solitary list constructor

2002-09-24 Thread Luke Palmer
=head1 TITLE Square brackets are the only list constructor =head1 VERSION Maintainer: Luke Palmer <[EMAIL PROTECTED]> Date: 24 Sep 2002 Number: 362 (?) Version: 1 =head1 ABSTRACT This RFC responds to the fury on perl6-language about the redundancy of parentheses and brackets with res