develooper Front page | perl.perl6.language | Postings from September 2002

Re: Paren madness (was Re: Regex query)

From:
Aaron Sherman
Date:
September 25, 2002 10:25
Subject:
Re: Paren madness (was Re: Regex query)
Message ID:
1032957088.23478.13.camel@localhost.localdomain
On Tue, 2002-09-24 at 17:27, John Williams wrote:

> If I understand our non-conclusions so far, we're waiting for Larry to
> clarify:
> 
>  1)  how to create a 1-tuple/1-item list?
> 
>  2)  how to interpret the flattened list context?  e.g. given this:
> 
> >       $x = (1,2,3);
> >       @y = (1,2,3);
> >       $z = [1,2,3];
> >       push @a, $x, @y, $z, (1,2,3), [1,2,3];
> 
>     What flattens, what doesn't, and how do you override the behavior?

Mostly I'm interested in the fact that () and [] now do exactly the same
thing, except that Perl 6 ()s can't create one-element lists. Given
that, ()s are just being wasted, syntacticly speaking, on backward
compatibility with Perl 5. I'd like to know if there's any chance of our
breaking with that backward compatibility.

Once again, just waiting for Larry to come back. I'm not really very
interested in pursuing this debate further until I find out what caveats
he may already be planning on introducing.

Once that's in place, I have a whole slew of questions regarding []s
that I think people will find interesting.

-- 
Aaron Sherman <ajs@ajs.com>




nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About