in

SharePoint Blogs

The Best Place for SharePoint-related Blogs

David Wise's Sharepoint blog

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.

Published Jan 31 2008, 09:33 PM by DavidWise
Filed under:

Comments

 

Kevin said:

Ah the ever frustrating existential question of null.

value added: William Henry Harrison

February 1, 2008 10:55 AM
 

Dave said:

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.

August 27, 2008 1:31 PM

Leave a Comment

(required )  
(optional )
(required )  
Add

About DavidWise

I have been writing software for over 16 years and web applications for 11 years. I have been also been elbow deep in SharePoint 2007 since Beta 2 and loving it! Currently, I work for Bennett Adelson Consulting (a Microsoft Gold Partner) based in Cleveland, Ohio.

Need SharePoint Training? Attend a SharePoint Bootcamp!

Posts (c) their respective authors. Everything else (c) 2007 SharePoint Experts