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 Path: eternal-september.org!reader01.eternal-september.org!reader02.eternal-september.org!news.eternal-september.org!news.eternal-september.org!feeder.eternal-september.org!1.eu.feeder.erje.net!feeder.erje.net!2.us.feeder.erje.net!weretis.net!feeder6.news.weretis.net!feeder.usenetexpress.com!feeder1.iad1.usenetexpress.com!border1.nntp.dca1.giganews.com!nntp.giganews.com!buffer1.nntp.dca1.giganews.com!buffer2.nntp.dca1.giganews.com!news.giganews.com.POSTED!not-for-mail NNTP-Posting-Date: Fri, 30 Jun 2017 10:02:42 -0500 Subject: Re: Ada Annoyances Newsgroups: comp.lang.ada References: <1ac5a44b-4423-443a-a7bb-2864d9abe78f@googlegroups.com> From: Norman Worth Date: Fri, 30 Jun 2017 09:02:41 -0600 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:49.0) Gecko/20100101 Firefox/49.0 SeaMonkey/2.46 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Message-ID: X-Usenet-Provider: http://www.giganews.com X-Trace: sv3-9RnpwIzYzNO3G5q+fAiQHqabzYXqwBX9sDFgR7Ie9HR33g6o/fnvCCvv/g21QZR1MA/H2do0VHEmocl!FFIxNPKnQGgBbGw7UPQ5sZWuby+jV3NCG0MUBm0zTPHSgchmGJrZDzERU06gV61S8XpAcE/WV9ND X-Complaints-To: abuse@giganews.com X-DMCA-Notifications: http://www.giganews.com/info/dmca.html X-Abuse-and-DMCA-Info: Please be sure to forward a copy of ALL headers X-Abuse-and-DMCA-Info: Otherwise we will be unable to process your complaint properly X-Postfilter: 1.3.40 X-Original-Bytes: 3169 Xref: news.eternal-september.org comp.lang.ada:47231 Date: 2017-06-30T09:02:41-06:00 List-Id: Randy Brukardt wrote: > wrote in message > news:be1619b4-2220-4287-8e67-1af32377d3f7@googlegroups.com... > ... >> Ada forcing tagged types on you to use certain features *is* a problem, if >> only >> because certain Ada users are forbidden to use tagged types altogether and >> thus >> are prevented to use a lot of useful features. > > Stupid language usage rules are not the problem of the language design, > they're a management problem. I can understand banning T'Class (thus banning > dynamic dispatching) and banning controlled types (thus banning hidden calls > that can be harder to analyze), but not banning tagged types themselves. > Indeed, (almost) all new types should be tagged - as Tucker said often > during the Ada 9x development, "Tagged types work right"; for the most part, > regular record types don't "work right" for various things and that can't be > fixed because compatibility concerns. (Although Ada 2012 did bite the bullet > about equality; that may be a significant reason why there is only one Ada > 2012 compiler to date.) > > Randy. > > Programmers should stop trying to write C++ in Ada. For the most part, it doesn't work. Where it is forced, it is ugly and unreliable. You should not use tagged types where they are not needed. It messes up the code. In general, if you are not going to have derived types, the base type should not be tagged. It's easy enough to change if you change your mind, but that means you didn't think things out fully. Tagged types really do work, for the most part. And Ada compilers are very smart about when they can use static calls and when dispatching is really needed. Using a tagged type for Ada.Controlled was a natural way of implementing it.