[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 14:18:15 CST
From: "RDP%ALAN.kahuna.decnet.lockheed.com"%ALAN.kahuna.DECNET.LOCKHEED.COM@Warbucks.AI.SRI.COM
Received: from THOMAS.kahuna.decnet.lockheed.com by ALAN.kahuna.decnet.lockheed.com via CHAOS with CHAOS-MAIL id 19020; 29 Jan 90 11:58:06 PST
Date: Mon, 29 Jan 90 11:57 PST
From: Robert D. Pfeiffer <RDP@ALAN.kahuna.decnet.lockheed.com>
Subject: Why is there no REAL number data type?
To: SLUG@ALAN.kahuna.decnet.lockheed.com
Message-ID: <19900129195748.6.RDP@THOMAS.kahuna.decnet.lockheed.com>
(This question has occurred to me a few times over the last couple of
years so I thought that I'd finally ask it.)
Can anyone tell me why the type REAL isn't defined in Common Lisp (nor
SCL)? It would seem like a good and useful type to have. It should
be a direct supertype of RATIONAL and FLOAT and a direct subtype of
NUMBER. It would provide a convenient way to specify a noncomplex number
(RATIONAL, for example, takes an argument of this type).
Comments, anyone? (Particularly you CL language theorists.)
ANSI Common Lisp will have the REAL type. When we were adding the
argument types to the language spec we noticed the type (AND NUMBER (NOT
COMPLEX)) coming up quite often and realized how stupid it was not to
have a name for that type.
barmar