🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: net.lang.st80
Article #327

What are new numbers equal to?

#327
From: Michael O'Brien
Date: Tue, 26 Aug 1986 23:42
22 lines
1489 bytes
For reasons perhaps better left unexplained, I recently evaluated the expression
"Float new = 0.0".  Hmm.  Should it be true?  False?  What value is in there,
anyway?  "nil" isn't a number.  Is it still "nil"?

BS II, of course, stepped off the curb.  Ran itself out of space contemplating
the philosophical wonderfulness of it all.  Dolphin CV4 claimed it was "true",
which is probably worse.  The same question, of course, applies to
"Integer new = 0", which also sends BS II out to lunch.
Note that class SmallInteger evades the problem by overriding the message "new"
and screaming at the user via a notifier.

Now, no one in his right mind ever creates numbers this way, but the philosophical
question remains, and it sure seems to me as if Smalltalkers are not, in general,
shy of philosophical questions.

Comments?
-- 
Mike O'Brien
The Rand Corporation

{sdcrdcf,decvax}!randvax!obrien
obrien@rand-unix.arpa
Technical Details
Message-ID: <488@randvax.UUCP>
Path: arc1-ca.pugleaf.net!utzoo!mnetor!seismo!nbires!hao!hplabs!sdcrdcf!randvax!obrien

Show Full Headers
Complete Article Headers
Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP
Path: arc1-ca.pugleaf.net!utzoo!mnetor!seismo!nbires!hao!hplabs!sdcrdcf!randvax!obrien
From: obrien@randvax.UUCP (Michael O'Brien)
Newsgroups: net.lang.st80
Subject: What are new numbers equal to?
Message-ID: <488@randvax.UUCP>
Date: Tue, 26-Aug-86 19:42:48 EDT
Article-I.D.: randvax.488
Posted: Tue Aug 26 19:42:48 1986
Date-Received: Thu, 28-Aug-86 01:38:20 EDT
Reply-To: obrien@randvax.UUCP (Michael O'Brien)
Organization: Rand Corp., Santa Monica
Lines: 22
Keywords: number-classes initialization