Everything2
Near Matches
Ignore Exact
Full Text
Everything2

null is not zero

created by fiftypin

(idea) by fiftypin (2.9 y) (print)   ?   (I like it!) Wed Aug 08 2001 at 6:29:48

null is not zero.

The concept of zero is not a concept of total lacking (ie, null) but one that describes a null count of something. The concept of null is a total lacking. Think black hole. Nothing there.

There isn't much use in real life of this understanding since there really isn't a total lack of something that we can describe. If we can describe it, it becomes a count of the described. However, in programming it is useful to know the difference between these two nothings. Thus the common error illustrated by this perl code:

my $var = shift() || 1; # assign default

which should be:

my $var = shift();
$var = 1 if !defined $var;

Being much uglier, the not-totally-paying-attention-programmer can sometimes opt for the former even if he knows better.


printable version
chaos

NULL is 0 The "Mary Ann or Ginger?" Game religious war Null pointer
Bjarne Stroustrup null Sniper Wolf epsilon
FAQ ADS Mu Zero
Disagreeable potato White trash C++
cipher
Y'know, if you log in, you can write something here, or contact authors directly on the site. Create a New User if you don't already have an account.
  Epicenter
Login
Password

password reminder
register

Everything2 Help

Cool Staff Picks
What you are reading:
Kids from the short bus
Record Shop Amnesia syndrome
Grandfather
Adam Purcell
I am three, she said
At the front with Dylan's army
Fast Food Nation
Jiddu Krishnamurti
The Endangered Species Act
Star Wars Holiday Special
E2 Offline Scratchpad
Delight in Disorder
You, born of the water, could you ever live far from the sea?
New Writeups
XWiz
Trism(review)
artman2003
Briefcase Full of Souls - Part I(fiction)
Dreamvirus
Alan Ladd(person)
waverider37
Harold Holt(person)
The Debutante
Until death do us part(fiction)
Ysardo
a brother to a sister(personal)
antigravpussy
your warm whispers(personal)
Clarke
Multiculturalism(idea)
aneurin
Earl of Landaff(person)
Heitah
Pseudocide(idea)
XWiz
Google Knol(lede)
Mythi
July 24, 2008(personal)
locke baron
The fall of Earth(fiction)
BookReader
Fear the Cold(dream)
Pavlovna
Kathleen MacInnes(person)
This affordable entertainment brought to you by The Everything Development Company