[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
commonlisp types
re: How do you define "valid type specifier"?
Very syntactically. I think its perfectly acceptable to have a set
of combination rules for making "words" in the type-specifier syntax,
even though some such "words" would be gibberish.
The important thing is that base-level types -- those defined in
CLtL -- along with DEFSTRUCT extensions be recognizable. They don't
have the problems that SATISFIES generates, or that a broken user
definition generates (such as your DEFTYPE FOO example).
By the bye, on another note, I haven't seen any implementation that
has the bug Kent wondered about earlier:
(defun bar (x) (symbolp x))
(defun foo (x)
(flet ((bar (y) (integerp y)))
(typep x '(satisfies bar))))
(foo 'x)
The correct answer is T, but I bet a lot of implementations return NIL
in compiled code.
Anyone know of an implementation for which this fails?
-- JonL --