Nikhil says,
| Thomas Johnsson says:
|
| > If I recall correctly, the := to be used in array comprehensions was a
| > consession to the FORTRAN/Id/Sisal community, so that array comprehensions
| > would look more like they were used to.
|
| Both Arvind and I think this is notation is awful, and I don't recall
| either of us ASKING for it, so this was probably someone else's idea
| of a ``concession'' to the Id community!
|
| Nikhil
All right! I'm sorry! ;-)
As I recall, Nikhil is right that neither he nor Arvind asked for this.
Some scientific programmers of my acquaintance did, though. Id uses
= for this purpose, together with square brackets around the index.
This, of course, was not possible for Haskell. The motivation was not
so much a "concession" to the Id community, as a concern for the
readability of
[((i,j), (f i j, g i j)) |
versus
[(i,j) := (f i j, g i j) |
or Id's
{matrix (1,N),(1,N) | [i,j] = (f i j, g i j) ||
(if I have that somewhere close to right). The use of := for pairing
(or if you like, binding, or single-assignment) rather that assignment
did have a precedent in Val and Sisal.
All this syntax may seem of little consequence now, but at the time,
there was a genuine concern about the unpalatability of some choices
of syntax to a large community of programmers.
--Joe