Are nil and null interchangeable? For example,
My bank a/c has a nil balance.
My bank a/c has a null balance.
English Language & Usage Stack Exchange is a question and answer site for linguists, etymologists, and serious English language enthusiasts. It only takes a minute to sign up.
Sign up to join this communityAre nil and null interchangeable? For example,
My bank a/c has a nil balance.
My bank a/c has a null balance.
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.
((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
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.
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.
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)
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.