On Mon, 2002-09-23 at 16:58, Trey Harris wrote:
> 4. Numeric value.
>
> The progression spoken about at great length previously:
>
> +() # == 0
> +(0) # == WHAT? 0? 1?
> +(0,1) # == 2
> +(0,1,2) # == 3
> +(0,1,2,3) # == 4
> +(0,...,n) # == n + 1
>
> is largely irrelevant to the ways people use Perl.
Typing this in the car, so pardon only taking this section...
Here are some examples that I see a lot of, re-cast as Perl 6:
my int $a = (($x+(y())) * $z); # Parenoia, as I call it
if (-s $file) > 100000 { ... } # LOTS of code does this
So, in our ultimate solution, I suggest that both of the examples above
must apply the parentheses for precedence purposes only.
Now, the idea of using brackets for list construction was, I grant, a
bit scary at first, but I think it's the only thing that gets what Larry
was suggesting in terms of list construction *and* avoids these issues
cleanly. Let's not kill that conversation before it has a chance to
prove itself or not.
This is one of the things that I find frustrating about discussing
language details like this. We (all) often find it hard to maintain
context with real-world code, and get lost in over-simplified examples
like C<+(0)> which seem contrived and unimportant in a vacuum.
--
Aaron Sherman <[EMAIL PROTECTED]>