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: 103376,b88383a5d9c51aa0 X-Google-Attributes: gid103376,domainid0,public,usenet X-Google-Language: ENGLISH,ASCII Path: g2news2.google.com!postnews.google.com!z15g2000yqm.googlegroups.com!not-for-mail From: "patrick.gunia@googlemail.com" Newsgroups: comp.lang.ada Subject: Re: Ada-Singleton-Why does it work like this? Date: Wed, 25 Mar 2009 08:19:46 -0700 (PDT) Organization: http://groups.google.com Message-ID: <7fad24bb-afca-4551-8d43-ffad304cd217@z15g2000yqm.googlegroups.com> References: <5a7a870c-40e2-4803-8753-0f9cfd2b800f@k2g2000yql.googlegroups.com> <13su65cm8b5ov$.1198qla32cc3i$.dlg@40tude.net> <0c060dc1-ee16-48cd-89cf-5f4f02185ee8@c11g2000yqj.googlegroups.com> <21fe3b9c-776d-47b6-8eaa-bb27ba53e83f@q16g2000yqg.googlegroups.com> NNTP-Posting-Host: 78.34.66.221 Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-Trace: posting.google.com 1237994386 10995 127.0.0.1 (25 Mar 2009 15:19:46 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: Wed, 25 Mar 2009 15:19:46 +0000 (UTC) Complaints-To: groups-abuse@google.com Injection-Info: z15g2000yqm.googlegroups.com; posting-host=78.34.66.221; posting-account=D7TrwwoAAAAVyN71CASRiSp392RIjlsB User-Agent: G2/1.0 X-HTTP-UserAgent: Opera/9.64 (Windows NT 6.0; U; de) Presto/2.1.1,gzip(gfe),gzip(gfe) Xref: g2news2.google.com comp.lang.ada:5274 Date: 2009-03-25T08:19:46-07:00 List-Id: > generic > =A0 =A0type T2 (<>) is private; -- any type with or without discriminants > > Formally, T2 is declared to have "unknown discriminants". =A0This is > also the case of the singleton type. Because, to the outside world, it > has unknown discriminants, it is unconstrained. The full view of the > type (in the private part of the package) may or may not specify > discriminants. > > -- > Ludovic Brenta. I think that this is what made me stumble. The fact that it simply states, that it=B4s unknown wether or not the type has discriminants and that the private part can or cannot use such discriminants. These are concepts, I haven=B4t seen before when using other languages. And because the package body knows the concrete structure of my Singleton_Type, it also knows that a discriminant is not defined and thus not necessary for creating new variables of my type. That is why I =B4m able to create a Singleton instance within the package body. Is this right? If so, then I finally got it...