Eero Saynatkari wrote:
> Jason Nordwick wrote:
>> What would seem most natural (and best) would be:
>>
>> a[1,3,5,6,7] or more generally a[list] (a[*list] seems unnecessarily 
>> complex and would be inconsistent with a[x..y] that is allowed).
>>
>> Is there a good reason this shouldn't be allowed? It would certainly 
>> simplify and shorten much of my code.
> 
> It conflicts with the current implementation
> 
>   [1, 2, 3, 4, 5][1, 3] # => [2, 3, 4]
> 

Oh course. That's (now) blindingly obvious. I don't think there is much I can do to prevent all the value_at calls. I can't really lay out my arrays differently to get better continuity, and I seem to be using value_at almost every line where there is a decent amount of computation. Overall, arbitrary indexing seems far more useful than range based indexing using the [start,len] notation. After all, there is already start../...stop notation. Too bad I guess.

-j



> On a tangent, if you find yourself doing a lot
> of #values_at, you may want to consider possibly
> changing your datastructure.
> 
>> -j
> 
>