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,UTF8 Path: g2news1.google.com!news4.google.com!feeder1-2.proxad.net!proxad.net!feeder1-1.proxad.net!oleane.net!oleane!hunter.axlog.fr!nobody From: Jean-Pierre Rosen Newsgroups: comp.lang.ada Subject: Re: Operation can be dispatching in only one type Date: Wed, 02 Dec 2009 15:29:31 +0100 Organization: Adalog Message-ID: References: <025105f2-5571-400e-a66f-ef1c3dc9ef32@g27g2000yqn.googlegroups.com> <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> <4b15b59b$0$7632$9b4e6d93@newsspool1.arcor-online.net> NNTP-Posting-Host: mailhost.axlog.fr Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Trace: s1.news.oleane.net 1259766716 19122 195.25.228.57 (2 Dec 2009 15:11:56 GMT) X-Complaints-To: abuse@oleane.net NNTP-Posting-Date: Wed, 2 Dec 2009 15:11:56 +0000 (UTC) User-Agent: Thunderbird 2.0.0.23 (Windows/20090812) In-Reply-To: Xref: g2news1.google.com comp.lang.ada:8286 Date: 2009-12-02T15:29:31+01:00 List-Id: John B. Matthews a écrit : >> This is the Java rule I had in mind. I found it thanks to the >> link you have supplied: >> "A Java compiler must carry out a specific conservative flow >> analysis to make sure that, for every access of a local >> variable or blank final field f, f is definitely assigned >> before the access; otherwise a compile-time error must occur." > > I can see the appeal of adding such an analysis to Ada. > > > Unless it has changed recently (it is sometimes since I updated my Java education), the Java solution is not bullet-proof: you can still access variables before initialization from constructors. Note that if the Java people were confident in their rule, there would be no need to require that every variable be initialized to zero! -- --------------------------------------------------------- J-P. Rosen (rosen@adalog.fr) Visit Adalog's web site at http://www.adalog.fr