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: a07f3367d7,dbbbb21ed7f581b X-Google-Attributes: gida07f3367d7,public,usenet X-Google-NewGroupId: yes X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news1.google.com!news3.google.com!feeder.news-service.com!xlned.com!feeder3.xlned.com!amsnews11.chello.com!nuzba.szn.dk!news.jacob-sparre.dk!pnx.dk!not-for-mail From: "Randy Brukardt" Newsgroups: comp.lang.ada Subject: Re: Operation can be dispatching in only one type Date: Wed, 2 Dec 2009 23:29:49 -0600 Organization: Jacob Sparre Andersen Message-ID: References: <025105f2-5571-400e-a66f-ef1c3dc9ef32@g27g2000yqn.googlegroups.com> <1w0q3zxzw79pt$.5z0juiky7kfd$.dlg@40tude.net> <0f177771-381e-493b-92bb-28419dfbe4e6@k19g2000yqc.googlegroups.com> <1nbcfi99y0fkg.1h5ox2lj73okx$.dlg@40tude.net> <59acf311-3a4a-4eda-95a3-22272842305e@m16g2000yqc.googlegroups.com> <4b150869$0$6732$9b4e6d93@newsspool2.arcor-online.net> <18vlg095bomhd.8bp1o9yysctg$.dlg@40tude.net> <4b152ffe$0$7615$9b4e6d93@newsspool1.arcor-online.net> <19nhib6rmun1x$.13vgcbhlh0og9$.dlg@40tude.net> <4b1557d0$0$7623$9b4e6d93@newsspool1.arcor-online.net> <4b15bf2b$0$7623$9b4e6d93@newsspool1.arcor-online.net> <1jcbtmi5rztyp$.norvlhez9i9$.dlg@40tude.net> NNTP-Posting-Host: static-69-95-181-76.mad.choiceone.net X-Trace: munin.nbi.dk 1259818191 15862 69.95.181.76 (3 Dec 2009 05:29:51 GMT) X-Complaints-To: news@jacob-sparre.dk NNTP-Posting-Date: Thu, 3 Dec 2009 05:29:51 +0000 (UTC) X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2900.5843 X-RFC2646: Format=Flowed; Original X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.5579 Xref: g2news1.google.com comp.lang.ada:8293 Date: 2009-12-02T23:29:49-06:00 List-Id: "Dmitry A. Kazakov" wrote in message news:1jcbtmi5rztyp$.norvlhez9i9$.dlg@40tude.net... ... > No the problem is whether to treat a call to the body as legal. The > problem > is that you could not rely on its contract (out Car), in order to be able > to decide whether this call would "initialize" the object. > > BTW, you consider ":=" as an initialization, but why? Where is a guaranty > that it initializes the object by a "valid" value? I feel that very > concept > is somewhat inconsistent with ADT. To expand on this point, there are a number of places in Ada where objects can become "deinitialized". (Compilation strategies can prevent some of these, but at a cost of more checks with the associated loss of performance. For instance, Janus/Ada prevents Unchecked_Conversion from deinitializing scalar objects -- but to do so requires that range/validity checks be done on the results of some conversions -- hardly "unchecked"). Other places (such as the result of Stream'Read and the results of Sequential_IO.Read for composite types, and especially abort) can't be eliminated in any reasonable way. If you really care about this topic, I suggest you read and reread 13.9.1 until you understand it. (Then join the ARG and explain it to the rest of us. ;-)! This is not at all a simple topic, and the sort of simple rule used by Java does little other than give a false sense of security (and a lot of annoying errors in code that has no problems). Randy.