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=-0.9 required=5.0 tests=BAYES_00,FORGED_GMAIL_RCVD, FREEMAIL_FROM autolearn=no autolearn_force=no version=3.4.4 X-Google-Thread: a07f3367d7,4ce5890331a5b529 X-Google-Attributes: gida07f3367d7,public,usenet X-Google-NewGroupId: yes X-Google-Language: ENGLISH,UTF8 Path: g2news1.google.com!postnews.google.com!j18g2000yqd.googlegroups.com!not-for-mail From: Maciej Sobczak Newsgroups: comp.lang.ada Subject: Re: Discriminants of tagged types Date: Wed, 27 Oct 2010 08:13:06 -0700 (PDT) Organization: http://groups.google.com Message-ID: References: <14314714-e92c-4036-9cbb-da8e72489261@h7g2000yqn.googlegroups.com> NNTP-Posting-Host: 137.138.182.236 Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Trace: posting.google.com 1288192386 10291 127.0.0.1 (27 Oct 2010 15:13:06 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: Wed, 27 Oct 2010 15:13:06 +0000 (UTC) Complaints-To: groups-abuse@google.com Injection-Info: j18g2000yqd.googlegroups.com; posting-host=137.138.182.236; posting-account=bMuEOQoAAACUUr_ghL3RBIi5neBZ5w_S User-Agent: G2/1.0 X-HTTP-UserAgent: Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.5; en-US; rv:1.9.2.8) Gecko/20100722 Firefox/3.6.8,gzip(gfe) Xref: g2news1.google.com comp.lang.ada:14837 Date: 2010-10-27T08:13:06-07:00 List-Id: On 27 Pa=C5=BA, 15:44, Robert A Duff wrote: > I believe Ada 2012 will allow defaults for LIMITED > tagged types, and I think (not sure) it's already > implemented in GNAT under -gnat2012 mode. =C2=A0The limited case > is easy And is actually what I need, as non-limited tagged types are nonsense anyway. In the mean time I have solved the problem by realizing that "taggedness" need not be public - in my case the type was tagged, because it was controlled (hate to repeat it, but the interaction between these two unrelated language features is really annoying). I don't have to expose the controlled nature of the type in the public view and moved the "tagged" keyword to private part. Interestingly, this allowed me to use default values for discriminants *and* have the controlled type. (and this also shows that your explanation for why it cannot work is shaky ;-) ) (except that now the "distinguished receiver" notation is gone...) -- Maciej Sobczak * http://www.inspirel.com