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=-0.3 required=5.0 tests=BAYES_00, REPLYTO_WITHOUT_TO_CC autolearn=no autolearn_force=no version=3.4.4 X-Google-Thread: a07f3367d7,65b902127ca8a604 X-Google-Attributes: gida07f3367d7,public,usenet X-Google-NewGroupId: yes X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news2.google.com!news1.google.com!npeer02.iad.highwinds-media.com!news.highwinds-media.com!feed-me.highwinds-media.com!border1.nntp.dca.giganews.com!nntp.giganews.com!newsfeed00.sul.t-online.de!t-online.de!feeder.news-service.com!proxad.net!feeder2-2.proxad.net!newsfeed.arcor.de!newsspool3.arcor-online.net!news.arcor.de.POSTED!not-for-mail From: "Dmitry A. Kazakov" Subject: Re: Issue with GNAT GPL 2009 and GtkAda Newsgroups: comp.lang.ada User-Agent: 40tude_Dialog/2.0.15.1 MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Reply-To: mailbox@dmitry-kazakov.de Organization: cbb software GmbH References: <4A414EBB.8060204@free.fr> <1avd65rn49abv$.krcxo2gdzb16$.dlg@40tude.net> <10ym4hltpwd4n$.1hcayfi4xidg3.dlg@40tude.net> <4a44842e$0$31872$9b4e6d93@newsspool3.arcor-online.net> <1hi0km5xe1802.17l3qjn1g9525$.dlg@40tude.net> Date: Sat, 27 Jun 2009 09:47:04 +0200 Message-ID: NNTP-Posting-Date: 27 Jun 2009 09:47:03 CEST NNTP-Posting-Host: 22e70d4a.newsspool1.arcor-online.net X-Trace: DXC=^8ZjgLfcD[d]BlmkiiU@Biic==]BZ:afn4Fo<]lROoRa^YC2XCjHcbihW8AT9f3U`iDNcfSJ;bb[eIRnRBaCd On Fri, 26 Jun 2009 16:38:45 -0500, Randy Brukardt wrote: > "Dmitry A. Kazakov" wrote in message > news:1hi0km5xe1802.17l3qjn1g9525$.dlg@40tude.net... > ... >> I would remove anonymous access types altogether, fixing the real language >> problems, which led to introducing them in first place. > > I don't think that there were any *real* language reasons for introducing > them; the reasons came from wanting to make Ada more appealing to C and Java > programmers. (A horrible reason for language design, IMHO.) They can be used > to work around some of Ada's other limitations. Even so, pointers were introduced in C and Java to for a reason. If this reason did not apply to Ada, then programmers would have ignored anonymous access types as superfluous. That did not happen. > In any case, it appears likely that Amendment 2 will repeal the prohibition > on "in out" parameters on functions (adding a conservative call check to > prevent obvious ordering dependencies). Promising... > We're also planning on adding a way to force by-reference parameter passing. > The motivating use is for the containers, but I'm sure it will find other > uses as well. This makes no sense to me. It is another mistake of making after C++. There is no reason why by-reference must be enforced anywhere if not required by the type. > As far as the use of class-wide components, I think that would be easily > fixed by just allowing them. That would make objects non-contiguous. It is not obvious to me how that will work with streams and pools. I prefer a more transparent model when all components of a constrained object are constrained. > That would reduce the need to use access types some more. (But it can never > be completely eliminated; sometimes you really do need reference semantics, > especially for returns.) No, this is the mental trap. If something requires by-reference semantics that is not a return. Considering containers: A (I) := X; It is a semantic mistake to treat A (I) as a function "returning" something. This can only lead to introducing more and more strange constructs like limited aggregates, return statements and other mess. A (I) := X; must be treated as a syntax sugar for a procedure call Put (A, I, X); -- Regards, Dmitry A. Kazakov http://www.dmitry-kazakov.de