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 10.200.34.204 with SMTP id g12mr16532304qta.15.1498007570753; Tue, 20 Jun 2017 18:12:50 -0700 (PDT) X-Received: by 10.157.43.235 with SMTP id u98mr960969ota.9.1498007570713; Tue, 20 Jun 2017 18:12:50 -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!border1.nntp.ams1.giganews.com!nntp.giganews.com!newsfeed.xs4all.nl!newsfeed9.news.xs4all.nl!news.tele.dk!news.tele.dk!small.news.tele.dk!feed118.news.tele.dk!y44no20565qth.1!news-out.google.com!s132ni232itb.0!nntp.google.com!185no656831itv.0!postnews.google.com!glegroupsg2000goo.googlegroups.com!not-for-mail Newsgroups: comp.lang.ada Date: Tue, 20 Jun 2017 18:12:50 -0700 (PDT) Complaints-To: groups-abuse@google.com Injection-Info: glegroupsg2000goo.googlegroups.com; posting-host=68.114.51.240; posting-account=HN9B-woAAACqJDcuOavWYdk7s1Vm8fv7 NNTP-Posting-Host: 68.114.51.240 User-Agent: G2/1.0 MIME-Version: 1.0 Message-ID: <1ac5a44b-4423-443a-a7bb-2864d9abe78f@googlegroups.com> Subject: Ada Annoyances From: pythoner6@gmail.com Injection-Date: Wed, 21 Jun 2017 01:12:50 +0000 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Xref: news.eternal-september.org comp.lang.ada:47037 Date: 2017-06-20T18:12:50-07:00 List-Id: I've recently been trying to learn some Ada, however, I've encountered a fe= w annoyances. I tend to perhaps be a bit too concerned about performance, s= o I try to stay away from things like tagged types when I don't actually ne= ed them (which is most of the time). But for some reason, there are some fe= atures that seemingly require tagged types for no reason - custom indexing = and iterators.=20 My specific case is a large buffer which I want to be able to pass around a= sub-range of (i.e. I have concrete types). I could just use explicit funct= ions to do what I want, but I'd really rather have the more convenient synt= ax of providing custom indexing and iterators. I just can't understand why these features require tagged types (especially= because I can implement custom indexing and iterators in C++ without invol= ving any kind of abstract classes or virtual functions). I assume though th= at the requirement is there for some reason, so I'm curious if anyone knows= what that reason might be. I really want to like Ada, and there's some really cool things it does like= allowing you to very exactly specify how types should be laid out in memor= y that are very useful for low level programming, but then I run into these= features requiring tagged types when I very much don't need them, which ju= st drives me crazy.