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,FREEMAIL_FROM autolearn=unavailable autolearn_force=no version=3.4.4 X-Received: by 2002:a6b:c411:: with SMTP id y17mr9497304ioa.265.1559346902108; Fri, 31 May 2019 16:55:02 -0700 (PDT) X-Received: by 2002:a9d:6f01:: with SMTP id n1mr2907852otq.276.1559346901953; Fri, 31 May 2019 16:55:01 -0700 (PDT) Path: eternal-september.org!reader01.eternal-september.org!feeder.eternal-september.org!news.dns-netz.com!news.freedyn.net!newsreader4.netcologne.de!news.netcologne.de!peer02.ams1!peer.ams1.xlned.com!news.xlned.com!feeder1.cambriumusenet.nl!feed.tweak.nl!209.85.166.216.MISMATCH!i64no700614iti.0!news-out.google.com!l135ni374itc.0!nntp.google.com!i64no700609iti.0!postnews.google.com!glegroupsg2000goo.googlegroups.com!not-for-mail Newsgroups: comp.lang.ada Date: Fri, 31 May 2019 16:55:01 -0700 (PDT) In-Reply-To: Complaints-To: groups-abuse@google.com Injection-Info: glegroupsg2000goo.googlegroups.com; posting-host=185.22.143.229; posting-account=rmHyLAoAAADSQmMWJF0a_815Fdd96RDf NNTP-Posting-Host: 185.22.143.229 References: User-Agent: G2/1.0 MIME-Version: 1.0 Message-ID: Subject: Re: References vs access types From: AdaMagica Injection-Date: Fri, 31 May 2019 23:55:02 +0000 Content-Type: text/plain; charset="UTF-8" X-Received-Bytes: 1944 X-Received-Body-CRC: 3434649292 Xref: reader01.eternal-september.org comp.lang.ada:56428 Date: 2019-05-31T16:55:01-07:00 List-Id: Am Freitag, 31. Mai 2019 18:55:57 UTC+2 schrieb Dmitry A. Kazakov: > My preferences list would be: > > #1 - Never, visually ugly, semantically questionable, lacking > transparent access to the target object and technically not a reference > at all, plus unstable with GNAT compilers > > #2 - Construction of new stand-alone objects (frequently class-wide), > implementation-dependent stuff > > #3 - Access to a component of an existing object > > As for hidden traps, only #3 is safe upon inheritance, if primitive > operation and thus covariant. I'm quite opposed to Dmitry. I admit that #1 is clumsy. But see Gem 123 to learn how this syntax may be improved with some aspects. (Compiler problems are never an argument to avoid some feature forever.)