Thread overview
querying keys in an associative array
Aug 17, 2001
chris schoeneman
Aug 18, 2001
Walter
Aug 20, 2001
Tobias Weingartner
Aug 21, 2001
Walter
August 17, 2001
i didn't see anything in the spec about iterating over or otherwise getting the keys in an associative array.  is that supported?  i'd really miss it if it wasn't (i routinely use that capability of perl).

also, is the range [] operator illegal for an associative array? i didn't see anything about the order of keys.  without that, a range would have no meaning, of course.  that's fine and gives the compiler more flexibility.

cheers,
-chris
August 18, 2001
Yes, there will be a .keys property for associative arrays that will give all the members as a regular array. -Walter

chris schoeneman wrote in message <3B7D9FC1.4FA48103@shutterfly.com>...
>i didn't see anything in the spec about iterating over or otherwise getting the keys in an associative array.  is that supported?  i'd really miss it if it wasn't (i routinely use that capability of perl).
>
>also, is the range [] operator illegal for an associative array? i didn't see anything about the order of keys.  without that, a range would have no meaning, of course.  that's fine and gives the compiler more flexibility.
>
>cheers,
>-chris


August 20, 2001
In article <9lknn3$2sig$2@digitaldaemon.com>, Walter wrote:
> 
> Yes, there will be a .keys property for associative arrays that will give all the members as a regular array. -Walter

Associative arrays in the base language?  Why not make it part of the base library instead?  At least then you can more easily support user supplied hashing techniques, etc.

--Toby.
August 21, 2001
If it's in the class library, then there's templates, operator overloading, etc.

Tobias Weingartner wrote in message ...
>In article <9lknn3$2sig$2@digitaldaemon.com>, Walter wrote:
>>
>> Yes, there will be a .keys property for associative arrays that will give all the members as a regular array. -Walter
>
>Associative arrays in the base language?  Why not make it part of the base library instead?  At least then you can more easily support user supplied hashing techniques, etc.
>
>--Toby.