SharePoint Blogs / SharePoint University
SharePoint Blogs and SharePoint University - all in one place!
Need SharePoint Training? Attend a SharePoint Bootcamp!

Please delete cookies related to sharepointblogs.com and sharepointu.com to resolve login issues!

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.


Posted 01-31-2008 9:33 PM by DavidWise

Comments

Kevin wrote re: The Battle for Nothing... or is it Null?
on 02-01-2008 10:55 AM

Ah the ever frustrating existential question of null.

value added: William Henry Harrison

Dave wrote re: The Battle for Nothing... or is it Null?
on 08-27-2008 1:31 PM

Pick one and use in across all languages? Haha!  It is a valid point you bring up, and even within a single language (T-SQL) NULL can have a TON of meanings.  However, there is absolutely no chance of 'retrofitting' any languages with new 'semantics of nothingness.'  Er, the chance is nil. Null. Nothing. But, of course, in T-SQL, it  IS NULL but NOT EQUAL TO NULL.

Add a Comment

(required)  
(optional)
(required)  
Remember Me?
Need SharePoint Training? Attend a SharePoint Bootcamp!
Posts (c) their respective authors. Everything else (c) 2009 SharePoint Experts, Inc.