I noticed some debate about the use of Null, particularly with reference to these two discussions:
http://www-10.lotus.com/ldd/nd6forum.nsf/ShowMyTopicsAllFlatweb/517593981bd085d685256ed8006c1633?OpenDocument
and
http://www-10.lotus.com/ldd/nd6forum.nsf/AuthorAllThreadedweb/eb3f4112be4fcf4185256ecc0056572c?OpenDocument
Since I started my development life in the Microsoft world, I’m was accustomed to using “” for empty strings, because the Null keyword has a different meaning. As a VB Instructor, it was always fun to start a debate by asking if Null, Nothing, Empty, and “” were interchangeable.
When I began developing in Domino, I was quite surprised to see thgat the formula language used Null and “” interchangeably. My personal preference is to use “” as much as possible, and avoid using Null, because it does have a different meaning in other languages.
(Unfortunately?) I do tend to use Null when providing information to other developers (or when training), because a lot of official materials use it, and I also don’t want confuse people who are used to seeing Null, and perhaps are not as familiar with “”. And after reading about stories of disgruntled programmers filling databases with Null-named items, I’m even more tempted to avoid using Null in any formulas.
I welcome any and all opinions/comments/rants/raves/suggestions/etc/ regarding this topic.
Subject: RE: Your thoughts about Null and its use in Formulas
I don’t think there’s really a debate about it, per se. There are people who know that it’s not part of the language, and people who have been mistrained to use it. The meaning of “” is perfectly clear, and it is more efficient to use since it doesn’t set the macro language interpreter scanning the items in the document to find one named “null”. Furthermore, using null causes a problem if there happens to be an item in the document by that name. Not a likely prospect, perhaps, but I like to use formulas that will work in all cases, not just in the vast majority of cases.
Subject: Agree 100%
Especially because Null has no special meaning in Formula Language. You might as well use Nada, or NothingAtAll.
And imagine where a few documents out of tens of thousands actually contains a field named Null, containing non-empty string. That’s a debug from hell!
Subject: *Exactly. I would never use Null
Subject: Sure enough!
It all makes perfect sense (and I plan on using the Nada/NothingAtAll example the next time I’m teaching formulas).
I’m sure that I’ve seen Null officially presented in many instances as if it were an intrinsic element of the formula language. The ND6 Help database mentions null fields but makes no mention of using the word Null in formulas (no doubt many people, like I used to, only think it is an intrinsic element) Had I put 2+2 together, I would have realized it isn’t, since the convention is to put such keywords in UPPERCASE.
Now I’m going to have to dig out my books and courseware and see how they presented the concept (maybe I just ready the material too quickly and made an assumption – and you know what happens when you assume…)
Subject: RE: Sure enough!
It’s quite possible that you saw this in course materials. If so, I’d like to know whose, so that I can straighten them out.
Subject: The only courseware I’ve ever used was the official Lotus curriculum