The Battle for Nothing… or is it Null?

I have worked in numerous programming languages and the one thing that I find most irritating is that every language feels the need to reinvent Nothing – literally – and then applies their own rules to it.

In VB, Nothing is Nothing.  In C# and JavaScript, Nothing is null.  Ruby's Nothing is nilNothing can also be Null or Empty or undefined, although it can sometimes be NaN, which is not necessarily Empty or Null.  Something that is undefined is sometimes null and sometimes not but something that is null is rarely undefined.

Throw in the mix how badly empty strings are handled where "" is not Empty or null, but is an EmptyString and could be NaN.  It could also be a NullString, which is still not a null or even a Null and certainly not an Empty or undefined.

Nothing/Null/null/nul/nil is a basic part of any programming language.  Is there any chance that we could pick one term, like Null (or null even), and use it across languages?

It's just a word, what is the big deal?  The word itself is trivial but the need to use a new term for something so basic is the root of my aggravation.  Each language feels that they have to use their own terms to be "cool", yet are just rebranding well established concepts without adding functionality.  That isn't innovation, that's marketing.  It's "New and Improved" without being either.

All it accomplishes is that it adds one more tiny step in the learning curve for that language and slows adoption.  Further, assuming that the "cool" factor won out in other areas, then there will be hundreds of other such tiny steps as well, all without any added benefit.

Tell you what, I'm going to create my own programming language called Presidents.Net, where all of my core data types are named after past Presidents.

private Jefferson ProcessRequest(Washington pRefID, Jackson pAmount)
   Lincoln User = getUserID(pRefID);
   Eisenhower AccountNumber = getAccount(User);
   return applyTransaction(AccountNumber, pAmount);

What is the value added?  Nil, or … null … or … Polk.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s