[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Why is there no REAL number data type?

    Date: Mon, 29 Jan 90 11:57 PST
    From: Robert D. Pfeiffer <RDP@ALAN.kahuna.decnet.lockheed.com>

    Can anyone tell me why the type REAL isn't defined in 
    Common Lisp (nor SCL)?  ...

By popular demand, and especially because it's important to CLOS method
dispatch to have a real class (ha,ha) there and not just something consed
up by deftype:

ANSI Common Lisp will have a type named REAL and an associated REALP
predicate.  The type is essentially equivalent to (OR RATIONAL FLOAT),
except that it is also a primitive CLOS class, and it is a "type
specifier that abbreviates" (i.e., it also handles low-hi ranges like
the other scalar number types do).