[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: CLOS vs. subtypes of FLOAT
- To: Common-Lisp-Object-System@SAIL.Stanford.Edu
- Subject: Re: CLOS vs. subtypes of FLOAT
- From: David A. Moon <Moon@STONY-BROOK.SCRC.Symbolics.COM>
- Date: Thu, 21 May 87 16:37 EDT
- In-reply-to: <870521-120802-1365@Xerox>
Date: 21 May 87 12:07 PDT
From: Masinter.pa@Xerox.COM
You omitted the possibility where all the classes exist in all
implementations, but that some of the classes might be empty (have no
instances) in some implementations.
Unfortunately this elegant-sounding choice can't be taken without
changing Common Lisp incompatibly. The problem is that Common Lisp
specifies (CLtL p.19) that in an implementation without short-floats,
(typep x 'short-float) does the same thing as (typep x 'single-float),
rather than always returning nil. We want to keep typep consistent
with class-instance relationships, to avoid giving Common Lisp too
subtly-incompatible type systems.