Robin Popplestone writes as an aside:
> With LISP descendents there are powerful preconceptions.
> Suppose, for example, you wanted an extra slot in every list-cell. You
> would have to rebuild the entire language implementation, and probably
> break it.
One of the objectives of ObjectClass was to make this possible.
If lists were a class, then it would be possible to further specialise
pairs by writing
define :class triple;
is pair;
slot extra;
enddefine;
It would then be possible to create lists from triples rather than pairs
and have the entire set of list operations work on them seamlessly.
Steve
|