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


    Date: Tue, 12 Aug 86  12:43:53 PDT
    From: Alan Snyder <snyder%hplsny@hplabs.HP.COM>

    I think the original request for this feature came from me, and the motivation
    was in fact to allow the portable implementation of object-oriented
    programming extensions.  If DEFCLASS defines a TYPE, then DEFCLASS needs some
    way to tell if the specified class name is the name of an existing type, so
    that it can issue some reasonable error message.  (Presumably, DEFCLASS knows
    if the specified name is the name of an existing CLASS, but it doesn't know
    about other types.)  TYPE-NAME-P is adequate for this purpose, although it
    would look ugly to have TYPE-NAME-P in the language if we ever figured out
    what TYPE-SPECIFIER-P should do (perhaps Guy's definition is adequate).

    To the best of my knowledge, neither DEFTYPE nor DEFSTRUCT define what happens
    if the specified type name names an existing type.  Defining their behavior in
    this case might also solve the problem (if an error is signalled in all cases
    of interest).  (Only the moderator is allowed to interpret this paragraph as
    opening a new issue!)

I see.  Note that you should be allowed to re-evaluate "the same" DEFTYPE,
DEFSTRUCT, or DEFCLASS, but should get an error if you evaluate one that is
not "the same" but has the same name.  This seems like a programming
environment issue.  For example, in Symbolics' system "the same" is defined by
the name of the file containing the form, with all forms typed in from the
terminal assumed to be "the same" and not "the same as" any form that came
from a file.  I can easily imagine other programming environments where
"the same" would be defined in a very different way.

The problem with calling this a programming environment issue rather than a
language issue is that that doesn't make it go away, since the whole point was
that you want a portable way to define (or extend) the programming
environment.  I don't have any solutions to offer, but my opinion is that
one of TYPE-NAME-P or TYPE-SPECIFIER-P should exist, but DEFCLASS should not
need to call it.