Array keys oddity?

Kay C Lan lan.kc.macmail at gmail.com
Mon Jun 8 00:41:42 EDT 2009


On Sun, Jun 7, 2009 at 6:00 PM, Bernard Devlin <bdrunrev at gmail.com> wrote:

> Part of the problem is that we refer to these containers in Rev as
> "arrays".  Really what Rev has is a container that is more
> appropriately referred to as a "dictionary".  It is commonplace in
> other languages to expect that a dictionary object will return the
> keys in an unsorted (and generally unpredictable order).
>
> Gee, I realise you are talking about programming languages but in everyday
language 'dictionary' would invoke an image of extreme order. I'm not
familiar with other programming languages but to use the term dictionary to
refer to an unordered list/pair seems bizarre to me. I would think that
would be an even harder concept to teach to a newbie, at least with array
it's a term they may not be familiar with and therefore they can be taught
it's unordered.

As Rev is an English like language, and as you say it's a type of container
were talking about, I suggest we use sockDraw - everyone knows the order
they go in has nothing to do with the way they come out, plus it has a pair
metaphor - left = key, right = value ;-)



More information about the use-livecode mailing list