From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00 autolearn=ham autolearn_force=no version=3.4.4 X-Google-Thread: 103376,839916f6ca3b6404 X-Google-Attributes: gid103376,domainid0,public,usenet X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news1.google.com!news2.google.com!border1.nntp.dca.giganews.com!nntp.giganews.com!nx01.iad.newshosting.com!newshosting.com!newspeer.monmouth.com!newsswitch.lcs.mit.edu!nntp.TheWorld.com!not-for-mail From: Robert A Duff Newsgroups: comp.lang.ada Subject: Re: not null Date: Wed, 04 Mar 2009 11:19:46 -0500 Organization: The World Public Access UNIX, Brookline, MA Message-ID: References: <49ae93bc$0$31872$9b4e6d93@newsspool3.arcor-online.net> NNTP-Posting-Host: shell01.theworld.com Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: pcls6.std.com 1236183587 8091 192.74.137.71 (4 Mar 2009 16:19:47 GMT) X-Complaints-To: abuse@TheWorld.com NNTP-Posting-Date: Wed, 4 Mar 2009 16:19:47 +0000 (UTC) User-Agent: Gnus/5.1008 (Gnus v5.10.8) Emacs/21.3 (irix) Cancel-Lock: sha1:i9kGt9gAs+sGbkEdGlK0W00sSrM= Xref: g2news1.google.com comp.lang.ada:3940 Date: 2009-03-04T11:19:46-05:00 List-Id: Hyman Rosen writes: > Georg Bauhaus wrote: >> As said to have been seen on /. >> another financial disaster, again caused >> by making references to nothing, in Algol W, >> http://qconlondon.com/london-2009/presentation/Null+References:+The+Billion+Dollar+Mistake > > You are misreading the abstract. First of all, it's not > about some particular incident. He's talking about the > overall impact. Yes. (I think Georg Bauhaus understood that.) >... Second, he's not talking about failure > to check for null references, he's talking about having > null references at all, so Ada is no better. There's nothing wrong with allowing programmers to use null pointers. There's a lot wrong with giving programmers a null value for all pointer types, whether they're wanted or not. It's just a tripping hazard. Ada is a little bit better than languages that always allow null, because it allows you to declare "not null" on an access [sub]type. It would be even better if "not null" were the default -- ideally, you should get a null value only if you ask for it explicitly. It's too late to fix it now. Ada is also better than languages that say deref of null leads to unpredictable behavior. At least you get a run-time error in Ada. But it's still a tripping hazard. See OCaml for a language that gets this right. - Bob