26

Are nil and null interchangeable? For example,

My bank a/c has a nil balance.

My bank a/c has a null balance.

10
  • possible duplicate of Is there a real difference between "null" and "zero"? (as implied in the top answer there, nil equates to zero) Mar 16 '12 at 15:00
  • What does "a/c" stand for in this context? Obviously not "air conditioning"...
    – Marthaª
    Mar 16 '12 at 15:46
  • @Marthaª, a/c-->account Mar 16 '12 at 15:57
  • @VijinPaulraj: really? Then why the slash? IME a slash is used in abbreviations to indicate separate words; it seems... misleading to use it between the first two letters of a word.
    – Marthaª
    Mar 16 '12 at 16:00
  • 2
    One must be careful with these terms in any sort of mathematical, computer programming, or physics context, as they tend to have specialized meanings.
    – Hot Licks
    Jan 20 '16 at 23:04
12

NULL is used in computing most often (always?) to signify "not a value." This is different than zero: in a bank database, a zero value means no money, while a NULL value means there has been no value assigned to the balance.

This is a specialized usage, but increasingly common as more people learn to program.

4
  • 1
    I use the word null just about daily in computer programming. It is extremely common for anyone creating software. Sep 9 '14 at 12:31
  • 6
    You forgot to add that 'null' and 'nil' are identical in programming; exact usage simply depends on which one a language has chosen to standardize on.
    – RonLugge
    Dec 14 '14 at 5:04
  • 1
    If you're writing in C, NULL is interchangeable with the value 0, though this isn't recommended May 31 '16 at 20:22
  • 2
    @dreadiscool it's not in general interchangeable. A conformant implementation may define it as ((void*)0) (which many do), which you then can't use in e.g. arithmetic: 5*NULL will give you a compilation error.
    – Ruslan
    Jul 9 '17 at 9:29
9

Almost the only time you hear or see null is in the legal expression ‘null and void’, while nil normally indicates that a football team has scored no goals. If the bottom line of your bank statement shows neither a credit nor a debit, what you have is a zero balance.

4
  • i dunno about other countries. But in India, here banks provide a special a/c i.e, no-frills a/c. and that is often called as null balance a/c, nil balance a/c, zero balance a/c. Mar 16 '12 at 8:16
  • 3
    As a side note, nil is rarely used in the U.S. for sports scores; nothing is used far more often (or, in place of nothing, one might hear zero, or even zip). The one exception I hear is when ardent soccer fans are discussing a soccer match ("Spain beat Portugal 2-0," [pronounced "two-nil"]; but, "The Falcons beat the Seahawks 10-0," [pronounced "ten-nothing"]). As a side note to my side note, very ardent soccer fans will refer to soccer as "real football." :^)
    – J.R.
    Mar 16 '12 at 8:32
  • A good example then, @Vijin, of Indian English, but I don't quite understand how a bank can offer a zero balance account. The whole point of a bank account, surely, is either to have a plus or a minus balance. Mar 16 '12 at 8:42
  • @BarrieEngland, wiki.answers.com/Q/What_is_no_frills_account the above mentioned a/c is called nil,null,zero balance a/c Mar 16 '12 at 9:04
8

Null is also used in mathematics (a null set) and science (null hypothesis). I can't think of a time when nil is used in those areas.

Etymologically, null is from French, and nil is from Latin.

3
  • Nilpotent is a common term, usually written as one word and sometimes as two, nil potent. Per ngrams for nil potent,nil - potent it appears all or nearly all of the hyphenated instances (like "nil- potent") result from end-of-line hyphenation. Mar 18 '12 at 19:03
  • But Ruby and Lua, even Golang uses nil instead of null. Oct 7 '13 at 0:10
  • 1
    @JLG I wonder then from where does 'null' come in French... Aug 1 '18 at 14:14
8

Nil means zero or nought

Null means nothing or empty

In everyday life, we tend to treat these terms as equivalent. But it is sometimes important to differentiate between them. (E.g. when working with SQL database data)

4

Null is also used in physics and electronics. Here's a description of a Null comparator using a Wheatstone bridge. Null tends to describe something with no net value, but possibly the sum of large values of opposing signs, while nil implies a value of 0.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.