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-Language: ENGLISH,ASCII-7-bit Path: g2news2.google.com!news4.google.com!feeder.news-service.com!feeder8.cambrium.nl!feed.tweaknews.nl!193.141.40.65.MISMATCH!npeer.de.kpn-eurorings.net!npeer-ng0.de.kpn-eurorings.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> Date: Fri, 26 Jun 2009 10:52:27 +0200 Message-ID: <1hi0km5xe1802.17l3qjn1g9525$.dlg@40tude.net> NNTP-Posting-Date: 26 Jun 2009 10:52:27 CEST NNTP-Posting-Host: f633d42e.newsspool3.arcor-online.net X-Trace: DXC=Ae4\5Tj1E[hOKO]LCQ@0g`McF=Q^Z^V3h4Fo<]lROoRa^YC2XCjHcbi1obUf_i?@_gDNcfSJ;bb[eFCTGGVUmh?dLK[5LiR>kgbW^CNMOB`_Qi X-Complaints-To: usenet-abuse@arcor.de Xref: g2news2.google.com comp.lang.ada:6629 Date: 2009-06-26T10:52:27+02:00 List-Id: On Fri, 26 Jun 2009 10:17:49 +0200, Georg Bauhaus wrote: > Dmitry A. Kazakov wrote: > >> Access types are much overused in Ada in order to overcome language >> problems unrelated to access types. > > Another reason to overuse _anonymous_ access types is > probably outside the language, but is present with language > users: anonymity provides for a reduction in perceived > programmer typing cost which is a convincing motive > to not use names in practice. I.e. > > type R is record > C1 : access T; -- quick & risky > C2 : Float; > end record > > is thought to bring less work. One of the language problems is that the container types do not well compose unconstrained types. Considering this one: type R is record C1 : T'Class; -- does not work, considering an access type C2 : Float; end record it should be allowed to do without access types, like: type R (Constraint : T'Range) is record C1 : T'Class (Constraint); -- Still class-wide, but constrained C2 : Float; end record T'Range is a subtype of Ada.Tags.Tag: subtype T'Range is T'Tag...; > Experience apparently shows that > it doesn't, since the anonymity virus becomes activated sooner > or later. (Judging by the number of reports of anonymous access > issues.) Yes. I think it is related to a more general issue of structural vs. nominal type equivalence. I suspect that structural equivalence never pays off. Ada, initially designed with nominal equivalence, swayed to the structural one. Anonymous access types is the most prominent example of. > Does "access T :=" really have 80/20 merits? I would remove anonymous access types altogether, fixing the real language problems, which led to introducing them in first place. -- Regards, Dmitry A. Kazakov http://www.dmitry-kazakov.de