[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
DEFSTRUCT and predicates
Date: Tuesday, 26 November 1985 17:20-EST
From: NGALL at BBNG.ARPA
The only complexity in the CL "-P" heuristic is dealing with qualified
predicates such as string-(lessp). Since defstruct created predicates
will ALWAYS be suffixing data-type names (NEVER existing predicate
names), defstruct can safely use the simple hyphenation heuristic,
i.e., if the data-type name is hyphenated, add "-P", otherwise add
"P". Can anyone think of counter-examples?
(defstruct (space-person (:include person))
Space-Person-P (or Space-Personp) is what you call a "qualified predicate."
I think defstruct SHOULD obey the CL convention. At the very least,
it should be documented that it is BREAKING the convention.
Yes, such a note in the manual would be worthwhile.