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.3 required=5.0 tests=BAYES_00,INVALID_MSGID autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,772ae8afc5db35f2 X-Google-Attributes: gid103376,public From: Matthew Heaney Subject: Re: Can't export object of private type Date: 1999/03/01 Message-ID: #1/1 X-Deja-AN: 449725612 Sender: matt@mheaney.ni.net References: <7b8cvc$ii5$3@plug.news.pipex.net> NNTP-Posting-Date: Sun, 28 Feb 1999 18:44:55 PDT Newsgroups: comp.lang.ada Date: 1999-03-01T00:00:00+00:00 List-Id: nospam@thanks.com.au (Don Harrison) writes: > Nick Roberts wrote: > > : package Planetary is > ... > : type Planet_Id is private; > ... > : private > : ... > : end Planetary; > > The problem here is that you lose the property of having a single instance: > > > 1) Have only one instance > > Since Planet_Id is exported, anyone can declare an object of that type. > We want to ensure there is only a single instance shared by all clients. Then declare the Plant_Id type as limited and indefinite: package Planetary is type Planet_Id (<>) is limited private; ... end Planetary;