I haven't gotten deep into the shape/array specs and I need to... nonetheless
On Tue, Jun 2, 2009 at 9:55 AM, Larry Wall <la...@wall.org> wrote: > I don't see why we shouldn't use the capture shape of the value > by default all the time, and do linear reshaping only if the value > comes in as a flat list. This highlights an edge case- in my mind at least, a "flat list" has a different shape from a one-row array. shape(*) or shape() vs shape(*;0)? Given the above, linear reshaping should not happen when given an explicitly-1D-shaped array on the right hand side, and that's something that should be spelled out and included in the spec tests. Or spell out the contradiction if I guessed wrong! >We've gone to some pains to allow ephemeral > shaping of values through captures, and it seems like it's good error > checking to check the shape of the value against the shape of the > container unless explicitly defeated. > > That is to say, if you erase the capture shape by putting the value > into list context, it linearizes it, and then the container knows > to reshape. Otherwise the container attempts to use the value slicily. I like this, though my comprehension is currently rather primitive.