[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
DEFSTRUCT and predicates
- To: NGALL@BBNG.ARPA
- Subject: DEFSTRUCT and predicates
- From: Skef Wholey <Wholey@C.CS.CMU.EDU>
- Date: Tue, 26 Nov 1985 22:27:00 -0000
- Cc: common-lisp@SU-AI.ARPA
- In-reply-to: Msg of 26 Nov 1985 17:20-EST from NGALL at BBNG.ARPA
- Sender: WHOLEY@C.CS.CMU.EDU
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.