Re: Proposal: Make @a and @@a different variables

2008-12-17 Thread TSa
HaloO, Daniel Ruoso wrote: The number of summands might be also unknown. i.e.: map. when you have my @a == map { ... } == something() you can't really know how many elements you have in the first dimension... Hmm, I thought that all lists know their length, and if not they advertise Inf.

Proposal: Make @a and @@a different variables

2008-12-16 Thread Daniel Ruoso
Hi, One of the hardest features in Perl 6 is the slice context. It is undoubtfully usefull, since it provides semantics to acces each iteration of a map, for instance. But there's one thing in the spec that makes not only slices, but the lists themselves considerably harder to implement, and

Re: Proposal: Make @a and @@a different variables

2008-12-16 Thread TSa
HaloO, Daniel Ruoso wrote: That being said, we should note that this example looks simple because we have almost no lazyness implied (since there's an assignment in the first line), every list access requires the evaluation of the flatenning of the list. my @@a = ((),(1,2,3),()); Mustn't

Re: Proposal: Make @a and @@a different variables

2008-12-16 Thread Daniel Ruoso
Em Ter, 2008-12-16 às 18:47 +0100, TSa escreveu: # the following will require a flatenning to get the actual index say @a[3]; Could we not shift the problem into a more complicated form of the size of the array? Here it has size 0+3+0 but each of the summands could be lazy and hence

Re: Proposal: Make @a and @@a different variables

2008-12-16 Thread Larry Wall
I think I'm fine with making them separate. Recursive lazy flattening seems too evil; slice and list contexts should not try to do the work of captures. Thanks. Larry

Re: Proposal: Make @a and @@a different variables

2008-12-16 Thread Moritz Lenz
TSa wrote: HaloO, Daniel Ruoso wrote: That being said, we should note that this example looks simple because we have almost no lazyness implied (since there's an assignment in the first line), every list access requires the evaluation of the flatenning of the list. my @@a =