new Smalltalk programmer's thoughts

Bill Spight bspight at pacbell.net
Mon May 1 23:27:21 UTC 2006


Dear Wolfgang,


> But it is not speculative that Smalltalk is the only programming
> language that allows indexed variables and forces the programmer to
> use one as the first index. If you find another one let me know.
> 
To add to the list, there's Icon.

Icon indexes in an interesting way. It indexes not the elements, but
before, after, and between elements. It also indexes from both ends of a
list or array. E. g.,

    (1,-3) A (2,-2) B (3,-1) C (4,0)

There are three elements, A, B, and C, and 8 indices, -3 to 4. 1 and -3
refer to the point before A, 2 and -2 to the point before B, and 3 and
-1 to the point before C. 4 and 0 refer to the end. To access an element
you use one of the indices that comes before it.

Best regards,

Bill




More information about the Squeak-dev mailing list