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,3dbf2f325f33ce35 X-Google-Attributes: gid103376,public From: Brian Rogoff Subject: Re: Elimination of "use" clauses Date: 1999/07/19 Message-ID: #1/1 X-Deja-AN: 502973497 References: <377B5807.88B875E0@cs.york.ac.uk> <7lh74s$v36$1@nnrp1.deja.com> <7ligdq$c8q$1@nnrp1.deja.com> <7ljb4e$na9$1@nnrp1.deja.com> <7ltus1$ah1@dfw-ixnews19.ix.netcom.com> <7mrjus$bet@dfw-ixnews14.ix.netcom.com> <7n0icj$1je@dfw-ixnews21.ix.netcom.com> Content-Type: TEXT/PLAIN; charset=US-ASCII X-Trace: nntp1.ba.best.com 932439571 217 bpr@206.184.139.136 MIME-Version: 1.0 Newsgroups: comp.lang.ada Date: 1999-07-19T00:00:00+00:00 List-Id: On Tue, 20 Jul 1999, Richard D Riehle wrote: > In article , > dale@cs.rmit.edu.au (Dale Stanbrough) wrote: > > >Export directives -could- do it (and it is not a bad idea at all), > >but we shouldn't forget that Ada already has the ability to export > >-just- the operators we want, and it's called using a private type > >and only advertising the appropriate operations. > > I fully agree that the private type is underused for this purpose. > However, you will need to declare the arithmetic and logical > operators for a private type. This is the ideal place for using > a nested Ops package to restrict the set of operators to exactly > those you want available in your design. If you don't mind making the client refuse to look at things he doesn't want to see, rather than making the provider hide what he doesn't want to show, generic signature packages could also be used in these situations. I still really dislike "use type". -- Brian