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=unavailable autolearn_force=no version=3.4.4 X-Received: by 10.176.9.226 with SMTP id e34mr15441193uah.36.1498046302443; Wed, 21 Jun 2017 04:58:22 -0700 (PDT) X-Received: by 10.157.60.116 with SMTP id j49mr1080579ote.0.1498046302399; Wed, 21 Jun 2017 04:58:22 -0700 (PDT) Path: eternal-september.org!reader01.eternal-september.org!reader02.eternal-september.org!news.eternal-september.org!news.eternal-september.org!feeder.eternal-september.org!nntp-feed.chiark.greenend.org.uk!ewrotcd!news.etla.org!feeder.erje.net!2.us.feeder.erje.net!weretis.net!feeder6.news.weretis.net!news.glorb.com!x58no2240qtc.0!news-out.google.com!s132ni683itb.0!nntp.google.com!185no3439053itv.0!postnews.google.com!glegroupsg2000goo.googlegroups.com!not-for-mail Newsgroups: comp.lang.ada Date: Wed, 21 Jun 2017 04:58:22 -0700 (PDT) In-Reply-To: <1ac5a44b-4423-443a-a7bb-2864d9abe78f@googlegroups.com> Complaints-To: groups-abuse@google.com Injection-Info: glegroupsg2000goo.googlegroups.com; posting-host=136.163.203.9; posting-account=HFCrOQoAAABZD_f-UUbYHm3lJDIrh-UX NNTP-Posting-Host: 136.163.203.9 References: <1ac5a44b-4423-443a-a7bb-2864d9abe78f@googlegroups.com> User-Agent: G2/1.0 MIME-Version: 1.0 Message-ID: Subject: Re: Ada Annoyances From: joakimds@kth.se Injection-Date: Wed, 21 Jun 2017 11:58:22 +0000 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Xref: news.eternal-september.org comp.lang.ada:47033 Date: 2017-06-21T04:58:22-07:00 List-Id: Hi! I am also concerned about performance. I really love the object-prefix = notation but "it's only available for tagged types" (i.e. type Car_Type is = tagged private;) and thus I also avoid tagged types except for when applica= ble (i.e. large types i.e. containers). I make heavy use of "use all type" = instead. Needless to say I am also curious about using tagged types in cust= om indexers and iterators. I don't know of a nice solution to your specific case in the Ada language. = If you use aliased parameters and implicit dereference you will expose the = whole of your buffer not part of it. The cleanest way forward is for you to= use a generic function that will expose part of your array. To see an exam= ple of this see "procedure Act_On_Immutable_Text (..) " in the Aida.Bounded= _String package: https://github.com/joakim-strandberg/aida_2012/blob/master/config/aida_src/= aida-bounded_string.ads Another thought on performance is avoiding controlled types where possible. Best regards, Joakim