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=ham autolearn_force=no version=3.4.4 X-Google-Thread: a07f3367d7,31465939d9bd22cc X-Google-Attributes: gida07f3367d7,public,usenet X-Google-NewGroupId: yes X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news2.google.com!news1.google.com!news.glorb.com!news2.glorb.com!solaris.cc.vt.edu!news.vt.edu!elk.ncren.net!newsswitch.lcs.mit.edu!nntp.TheWorld.com!not-for-mail From: Robert A Duff Newsgroups: comp.lang.ada Subject: Re: Question about default discriminants and mutable objects. Date: Fri, 07 May 2010 08:35:54 -0400 Organization: The World Public Access UNIX, Brookline, MA Message-ID: References: <4be20f28$0$2431$4d3efbfe@news.sover.net> <866a9a72-1f76-480d-b860-57e66ae155c0@d39g2000yqa.googlegroups.com> <62cb6d15-8436-45d8-978c-3bd98254387d@q30g2000yqd.googlegroups.com> <4be361f3$0$2430$4d3efbfe@news.sover.net> NNTP-Posting-Host: shell01.theworld.com Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: pcls6.std.com 1273235736 613 192.74.137.71 (7 May 2010 12:35:36 GMT) X-Complaints-To: abuse@TheWorld.com NNTP-Posting-Date: Fri, 7 May 2010 12:35:36 +0000 (UTC) User-Agent: Gnus/5.1008 (Gnus v5.10.8) Emacs/21.3 (irix) Cancel-Lock: sha1:KGasJOFmNCdPzHfla8Rw4QKnlpI= Xref: g2news2.google.com comp.lang.ada:11366 Date: 2010-05-07T08:35:54-04:00 List-Id: "Randy Brukardt" writes: > Remember that there are three of them: one each for Ada 83, Ada 95, and Ada > 2005. Depending on the feature, you might need to look at all three. (Not > sure if there will be one for Ada 2012.) Right. Also, for very detailed design decisions, look at the AARM for rationale. That's not available for Ada 83 -- I think Jean Ichbiah was not a "detail man". ;-) As to default discriminants causing mutable discriminants, despite the rationale, it's a bad design. It's confusing. And it means you can't use defaults just as defaults when you want immutable discriminants. Except you CAN do that for limited types (more confusion). And for '[in] out' parameters, you don't know at compile time whether the thing is mutable, which is just a tripping hazard. Also, some compilers chose the deallocate/reallocate strategy, and others chose the allocate-the-max strategy. That's bad; it means you can't use the feature portably. Standards are supposed to promote uniformity. - Bob