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 Path: g2news2.google.com!news2.google.com!news.glorb.com!news2.glorb.com!feeder.erje.net!news2.arglkargh.de!newsfeed.straub-nv.de!nuzba.szn.dk!news.jacob-sparre.dk!pnx.dk!not-for-mail From: Jacob Sparre Andersen Newsgroups: comp.lang.ada Subject: Re: not null Date: 06 Mar 2009 13:43:24 +0100 Organization: Jacob Sparre Andersen Sender: sparre@jspa-nykredit Message-ID: <87mybyg6tv.fsf@nbi.dk> References: <49ae93bc$0$31872$9b4e6d93@newsspool3.arcor-online.net> <761a4fb8-de91-43b3-b420-55dbc06a61e7@k9g2000prh.googlegroups.com> <3234a1e2-5f7a-4a26-8b7b-65e3ac67d65f@s20g2000yqh.googlegroups.com> NNTP-Posting-Host: 79.138.232.199.bredband.3.dk Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit X-Trace: munin.nbi.dk 1236343407 25132 79.138.232.199 (6 Mar 2009 12:43:27 GMT) X-Complaints-To: news@jacob-sparre.dk NNTP-Posting-Date: Fri, 6 Mar 2009 12:43:27 +0000 (UTC) User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.4 Xref: g2news2.google.com comp.lang.ada:4958 Date: 2009-03-06T13:43:24+01:00 List-Id: Harald Korneliussen wrote: > Adam Beneschan wrote: > > I'm having difficulty understanding the point. �You have to have > > the idea of the lack of a reference. �How else would you implement > > a linked list abstraction? > > You can use algebraic data types to do that in a type safe manner. > Haskell, Ocaml and many smaller functional languages do: If a > function returns a "Maybe Integer" type, the compiler will warn you > if you pretend it's an Integer without dealing with the "Nothing" > case. Can this be implemented as a static check? (Or is there a good reason that it is only a warning?) It would be nice(TM) if Ada compilers could do something like that for with null access types. Greetings, Jacob -- Adlai Stevenson said it all when, at an event during the 1956 Presidential campaign, a woman shouted, "You have the vote of every thinking person!" Stevenson shouted back, "That's not enough, madam, we need a majority!"