Hi, just wondering what happened to associative arrays. I understand that
REBOL's blocks and hashes are powerful, but there's still no easy way as far
as I know to just say (like you can in Perl, for instance) $blah{'value'} =
"supercalifragilisticexpialidocious", and get the value by just saying
$blah{'value'}. Is there something I've missed, or am I looking at things in
a non-REBOL way? Is there a reason for not providing a data structure that
works this way?

I know you can just say something like:

>> hash: []
== []
>> append hash [key "value"]
== [key "value"]
>> select hash 'key
== "value"

but this allows for duplicate key values, for instance. One of the nifty
keen things about Perl's hash type is that you can use it as sort of a
"uniqueness" tester, since the hash keys have to be unique. By just using
"exists $hash{'key'}" you can tell whether something already has that key
value. Anyway, you get the idea. If anyone can help me think of this in a
more 'REBOLlious' way I'd appreciate it. Thanks!

Keith

Reply via email to