Thread overview | ||||||
---|---|---|---|---|---|---|
|
August 17, 2001 querying keys in an associative array | ||||
---|---|---|---|---|
| ||||
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 Re: querying keys in an associative array | ||||
---|---|---|---|---|
| ||||
Posted in reply to chris schoeneman | 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 Re: querying keys in an associative array | ||||
---|---|---|---|---|
| ||||
Posted in reply to Walter | 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 Re: querying keys in an associative array | ||||
---|---|---|---|---|
| ||||
Posted in reply to Tobias Weingartner | 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.
|
Copyright © 1999-2021 by the D Language Foundation