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!feeder.eternal-september.org!aioe.org!.POSTED!not-for-mail From: "Dmitry A. Kazakov" Newsgroups: comp.lang.ada Subject: Re: Ada Annoyances Date: Sun, 17 Dec 2017 18:27:07 +0100 Organization: Aioe.org NNTP Server Message-ID: References: <1ac5a44b-4423-443a-a7bb-2864d9abe78f@googlegroups.com> <1498048151.20885.28.camel@obry.net> <96174ea5-852d-44e9-8535-7c1eb24d5326@googlegroups.com> <8d3aff06-82df-485f-89e5-a50c326aab05@googlegroups.com> <66aa262e-2ac9-4016-b32d-e9fee14779e1@googlegroups.com> NNTP-Posting-Host: sWq1fEaAu/L5fGxxOY76vQ.user.gioia.aioe.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit X-Complaints-To: abuse@aioe.org User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.5.0 X-Notice: Filtered by postfilter v. 0.8.2 Content-Language: en-US Xref: reader02.eternal-september.org comp.lang.ada:49508 Date: 2017-12-17T18:27:07+01:00 List-Id: On 2017-12-17 17:24, Mehdi Saada wrote: > So, some of you think the stupidity is on the side of certain > customers, to ban tagged types as a whole, as objetively there is no > added cost when we don't use 'Class types ? Rather than on the language > designers', for tagging controlled type and cursor etc by default ? > Can someone answer simply, if there is or not, really no difference > (save for some more bits for the tag) between regular records types and > tagged types, when not using class types ? There is a huge difference even without class-wide objects. Some things from the top: 1. You can derive a new type from a tagged type, which you cannot do from a non-tagged type 2. You can clone a non-tagged type, which you cannot do with a tagged type. 3. The meaning of abstract operations like procedure Foo (X : T) is abstract; for tagged and non-tagged types is totally different 4. Type polymorphism is still available for tagged types without class-wide objects as you can have generic formal parameters: generic type X is new Y with private; 5. You can inherit operations of tagged types. 6. You cannot declare certain operation signatures with tagged types due to multiple-dispatch issues. 7. Declaration of tagged types are subject of freezing rules. 8. Visibility of primitive operations is radically different. You can reach primitive operation even if they are not visible. 9. Certain signatures behave differently if arguments are tagged, e.g. when several arguments are controlled the tags must be same. -- Regards, Dmitry A. Kazakov http://www.dmitry-kazakov.de