Re: associative arrays

new topic     » goto parent     » topic index » view thread      » older message » newer message

Carl wrote:

>Minor quibble: The term 'list' may confuse Lisp/Prolog/Haskell
>programmers, and those who have implemented linked lists in other
>languages to get some level of sequence style arrays.

Yeah, I know, but 'associative arrays' is such a mouthful! Besides,
all Lisp/Prolog/Haskell programmers seem to be confined to a single
lab at one of the more obscure US universities. They are generally
very clever guys, unlikely to be fooled by us...

Thanks for your suggestions, Carl, but you probably know, what I think
about types. There are, of course, no types in Euphoria once you get
into objects and sequences, not in the conventional sense. So, as far
as I am concerned, type checking is just a drag and a bloat,
unnecessary baggage. A debugging tool of dubious value at best.

>[global?] constant -- Readability
>    Keys = 1,
>    Data = 2

How is Keys and Data more readable than 1, 2 ? Especially since there
is no reason to have them global - no one will ever even see them!

>global function invert(list assoc)
>    -- Generate a reverse lookup list
>    return {assoc[Data], assoc[Keys]}
>end function

This one has already cost me one sleepless night. For heaven's sake,
can you suggest a single possible use of it?

>Carl -- Wondering how he manages to irritate Jiri so much...

On the contrary, I have never been irritated by you, so far. After
all, we usually appear to finish on the same side in most arguments,
on a similar wavelength...

jiri

new topic     » goto parent     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu