Re: novice: mapcan use?



Kent M Pitman <pitman@xxxxxxxxxxx> wrote:

> Certainly there are many destructive operations on other data structures,
> and they are quite important. How many people seriously expect array
> operations to be non-destructive, yet we do not call AREF by some goofy
> name like AREF! nor even NAREF.

For exactly that reason, methinks. I do not seriously expect array
operations to be non-destructive, but I *do* intuitively expect list
operations to be non-destructive. The other difference is that
destructive list operators destroy the structure of the list, not just
the data inside. This is a fuzzy concept obviously, since a CDR pointer
is "data" just as much as an atom or some class object would be, but
hopefully you get my point about intuition.

Also, unless I'm missing something, Aref *itself* isn't destructive, it
just offers the occasion of destruction by being a setf-able place. If
you only read the aref, nothing is destroyed. I always expect setf to
be destructive.

> (The history of "N" for destruction is a pretty silly story itself. At
> least Interlisp had the good sense to use "D".)

I've always wondered where the 'n' comes from.


Michael
.



Relevant Pages

  • Re: novice: mapcan use?
    ... > Do you mean "the majority of functions that are ever called destructive ... > name like AREF! ... introduced a new term in my book, "recycling" to ... > (The history of "N" for destruction is a pretty silly story itself. ...
    (comp.lang.lisp)
  • Re: novice: mapcan use?
    ... the majority of the destructive functions are defined on ... Do you mean "the majority of functions that are ever called destructive ... name like AREF! ... (The history of "N" for destruction is a pretty silly story itself. ...
    (comp.lang.lisp)