[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Hairiness of arrays

I agree; array indirection could be removed from Common Lisp and
probably would not severely hurt portability.  Array indirection
was always one of those things that was most closely "computer-like",
depending on mapping one storage format on top of another storage
format.  It is a fundamentally poor thing to do because of the
non-obvious aliasing of data elements that it sets up.  It has
always been one of the hardest things to document because of this.
It requires the storage format of arrays to become apparent to
the semantics of the language, whereas taste and sense (in my own
opinion) dictate that the storage layout of an array should be no
more visible than the storage layout of a symbol or a bignum.

If people really want to keep this feature, we might consider
restricting it to its most useful case, namely mapping a 1-D array
onto a multi-D array, with the elements having exactly the same

If this would make Common Lisp substantially easier to implement
on some machines, and make arrays seem less daunting, I'm all for it.