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=ham autolearn_force=no version=3.4.4 X-Google-Thread: a07f3367d7,59f8c74007a6b12b X-Google-Attributes: gida07f3367d7,public,usenet X-Google-NewGroupId: yes X-Google-Language: ENGLISH,ASCII Path: g2news1.google.com!postnews.google.com!x15g2000vbr.googlegroups.com!not-for-mail From: xorque Newsgroups: comp.lang.ada Subject: Re: Forcing use of "constructors" Date: Mon, 23 Nov 2009 06:15:55 -0800 (PST) Organization: http://groups.google.com Message-ID: References: <15055d2d-0dd5-4c84-bd4a-1cc60e9dea2d@p32g2000vbi.googlegroups.com> <27db03bc-9655-4a65-a730-bcad83bfe616@h2g2000vbd.googlegroups.com> NNTP-Posting-Host: 78.143.202.207 Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-Trace: posting.google.com 1258985755 2671 127.0.0.1 (23 Nov 2009 14:15:55 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: Mon, 23 Nov 2009 14:15:55 +0000 (UTC) Complaints-To: groups-abuse@google.com Injection-Info: x15g2000vbr.googlegroups.com; posting-host=78.143.202.207; posting-account=D9GNUgoAAAAmg7CCIh9FhKHNAJmHypsp User-Agent: G2/1.0 X-HTTP-UserAgent: Mozilla/5.0 (X11; U; FreeBSD amd64; en-US; rv:1.9.0.13) Gecko/2009081019 Firefox/3.0.13,gzip(gfe),gzip(gfe) Xref: g2news1.google.com comp.lang.ada:8211 Date: 2009-11-23T06:15:55-08:00 List-Id: On Nov 23, 1:38=A0pm, Ludovic Brenta wrote: > > Declare your type to have unknown discriminants: > > package P is > =A0 =A0type T (<>) -- unknown discriminants: objects requires > initialization Nice, thanks. I knew it was something along these lines... > > You can also make your type controlled or limited controlled. You can > expose the controlledness in the public part or hide it in the private > part. This raises a good point, actually - I've never really been sure what the advantage is of exposing the controlledness (or hiding it, for that matter). I hide everything by habit but I'm not sure if I'm causing a consumer deep problems down the line... Regards, xw