[Ecls-list] Can SUBTYPEP fail?

worm worm at arrakis.es
Sat Mar 22 13:11:03 UTC 2003


Dear all,

I am in the process of writing a new SUBTYPEP and TYPEP routines for ECL
(A Common-Lisp implementation hosted at SourceForge,
http://ecls.sf.net). I am almost there, but in comparison to other
implementations, I have currently chosen to signal an error when the
type specifier is not known to be a type to the system.

My decision was inspired by

1) In the definition of SUBTYPEP, the two first arguments are said to be
"type specifiers" = "an expression which denotes a type", according to
the glossary.

2) A paragraph in the HyperSpec which states that, except for a few
pathological cases (SATISFIES, AND, FUNCTION, ...), SUBTYPEP has to
determine the type relationship precisely.

However

3) In CLISP and CMUCL, when the arguments passed is not a valid type
specifier, they both return (VALUES NIL NIL).

4) The ANSI specification says nothing about exceptional conditions in
SUBTYPEP.

I am wondering whether I should rewrite my implementation to follow
"common use" or whether I have misinterpreted the HyperSpec. What do
commercial implementations do? What would people find less annoying? To
myself, that SUBTYPEP may signal an error has been useful in the last
week, as it has pointed out a few errors in other parts of the code.

Best regards

Juanjo

[Please forgive if I am not very responsive next week, but I will be
abroad for some days]






More information about the ecl-devel mailing list