[E-Lang] An Attempted Restatement of Hydro's Semantics

Ralph Hartley hartley@aic.nrl.navy.mil
Tue, 03 Apr 2001 13:49:05 -0400


Marc Stiegler wrote:

> 
>>> An indexable list is one of the first tools a programmer will reach for.
>> 
> It
> 
>>> must be there.  We'll already surprise them enough when they find out it
>>> must be immutable.
>> 
>> I know MarcS has said this before too, but he's never shown a plausible
>> example. E's for loop really obviates the need for index operations.
> 
> 
> Having belatedly observed that the E programmer can always fall back upon
> Java collection types, I have opened myself to arguments for radical
> departures from conventional programming notions. Having arrived in this
> very different headspace, I now examine Tyler's arguments on their other
> merits rather than on their backward-compatibility-with-human-expectations
> features, and I come to an amusing, even astonishing (to me) conclusion:
> Tyler seems to be correct about not needing indexability.

Thinking about the last time I used indexes in Java:

You have two lists {"Mark","Mark","Tyler","Ralph"} and 
{"Stiegler","Miller","Close","Hartley"} and you want to print
Mark Stiegler
Mark Miller
Tyler Close
Ralph Hartley

Also, I don't think it's so rare to need to access a list in random 
order, stepping forward for a while and then back tracking.

I do know that I still use elementAt in Java fairly often, even though I 
almost never use iteration on an integer to go through a list.

It certainly is not enough that you can find any element by taking a 
combination "car"s and "cdr"s.

Ralph Hartley