[E-Lang] Immutable map operations

Bill Frantz frantz@pwpconsult.com
Wed, 28 Mar 2001 10:44:43 -0800


At 8:44 AM -0800 3/28/01, Marc Stiegler wrote:
>Most of what markm said  about operators looks okay to me, though I can't
>say I have fully digested it. This one piece is scary:
>
>> The other case that probably deserves syntactic support is the side-effect
>> free variant of the familiar
>>
>>     array[index] := value
>>
>> for which
>>
>>     list |= [index => value]
>>
>> could work out, as a generalization to lists of its proposed meaning for
>> maps, which follows.
>
>Is this the actual proposal for E's closest approximation to the ancient
>operation
>
>list[3] := 4
>
>?
>My reaction, looking at this through marketing eyes, trying to attract
>programmers by saying E looks so much like what they already use, is
>inexpressible. If this is our closest approximation, we really do need a
>separate mutable array. We can deprecate the array syntax in E v2.0.

Since arrays are on the table, here's my 2 cents worth.

The last languages I used where multi-dimensional arrays made any kind of
sense were Fortran and PL/I.  The C unification of arrays and addressing
lost me when the hidden length of row (or was it column) multiplication
operation was included.

Since multi-dimensional arrays are so important for many kinds of
scientific processing, can we consider decent support without destroying a
generation of Java and C programmer's expectations?

Cheers - Bill


-------------------------------------------------------------------------
Bill Frantz       | Microsoft Outlook, the     | Periwinkle -- Consulting
(408)356-8506     | hacker's path to your      | 16345 Englewood Ave.
frantz@netcom.com | hard disk.                 | Los Gatos, CA 95032, USA