Barry Margolin
11/16/2015 4:19:00 PM
In article <20151116170808.199f541c@samara.DOMA>,
Carlos <angus@quovadis.com.ar> wrote:
> [Jim Newton <jimka.issy@gmail.com>, 2015-11-16 04:34]
> > CLHS 4.1 defines type as follows: A type is a (possibly infinite) set
> > of objects.
> >
> > I'm trying to write an article which potentially non-lispers may
> > read, and that definition seems problematic to me, especially in the
> > presence of the SATISFIES types taking function redefinition into
> > account, and also types defined by classes in the presence both of
> > CHANGE-CLASS and class redefinition.
> >
> > It seems to me that a type is really a set of objects at a particular
> > time slice of an executing program.
> >
> > E.g.
> >
> > (defun F (x)
> > (member x '(1 2 3))
> >
> > (typep 3 '(satisfies F))
> > ==> t
> >
> > (defun F (x)
> > (member x '(2 4 6))
> >
> > (typep 3 '(satisfies F))
> > ==> nil
> >
> > The type (satisfies F), ie., the set of objects belonging to this
> > type, changes as the program is executing.
> >
> > Does anyone know whether this subtlety is addressed anywhere in the
> > specification. Or should it just be considered obvious?
> >
>
> I think it's obvious. Even without using CHANGE-CLASS or redefining the
> "satisfies" function, just by creating objects you change a type's
> membership.
That's true in pretty much every language.
--
Barry Margolin, barmar@alum.mit.edu
Arlington, MA
*** PLEASE post questions in newsgroups, not directly to me ***