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 autolearn=ham autolearn_force=no version=3.4.4 X-Google-Thread: 103376,29d8139471e3f53e X-Google-NewGroupId: yes X-Google-Attributes: gida07f3367d7,domainid0,public,usenet X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news1.google.com!news4.google.com!feeder.news-service.com!feeder.erje.net!news.szaf.org!news.gnuher.de!news.enyo.de!not-for-mail From: Florian Weimer Newsgroups: comp.lang.ada Subject: Re: Preventing type extensions Date: Sun, 12 Sep 2010 14:53:18 +0200 Message-ID: <87y6b7cedd.fsf@mid.deneb.enyo.de> References: <87iq2bfenl.fsf@mid.deneb.enyo.de> <874odv9npv.fsf@ludovic-brenta.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: idssi.enyo.de 1284295998 21293 172.17.135.6 (12 Sep 2010 12:53:18 GMT) X-Complaints-To: news@enyo.de Cancel-Lock: sha1:QRXD9S8PrDY/Xl4iHDRvxLIUOTY= Xref: g2news1.google.com comp.lang.ada:14026 Date: 2010-09-12T14:53:18+02:00 List-Id: * Ludovic Brenta: > Florian Weimer writes on comp.lang.ada: >> Suppose I've got a tagged type. I want to expose the fact that it is >> a tagged type outside its package, but want to prevent type extensons. >> (In short, I'm interested in something like final classes in Java or >> C++0X.) > > I think the way to do this is to hide the fact that the type is tagged > :/ Why do you want to make the type publicly tagged if not to allow type > extension? I want to use some features which come with tagged types, like the OO call notation or the fact that the type implements an interface.