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,a3736685ef876ab2 X-Google-Attributes: gid103376,public,usenet X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news1.google.com!news2.google.com!news.glorb.com!sn-xt-sjc-05!sn-xt-sjc-09!sn-post-sjc-02!sn-post-sjc-01!supernews.com!corp.supernews.com!not-for-mail From: Matthew Heaney Newsgroups: comp.lang.ada Subject: Re: OO Style with Ada Containers Date: Mon, 26 Nov 2007 04:07:08 +0000 Organization: Posted via Supernews, http://www.supernews.com Message-ID: References: <1195082906.420079.195000@d55g2000hsg.googlegroups.com> <1195084214.480299.13970@t8g2000prg.googlegroups.com> <1195084752.840598.174460@v65g2000hsc.googlegroups.com> <1195086265.070953.93180@d55g2000hsg.googlegroups.com> <2e37536e-55fb-42d5-a073-10b47cc31128@v4g2000hsf.googlegroups.com> <47475850.2080208@obry.net> User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.1 (windows-nt) Cancel-Lock: sha1:w/XnSlbvel5irvcWyuP1f3T2y2g= MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Complaints-To: abuse@supernews.com Xref: g2news1.google.com comp.lang.ada:18618 Date: 2007-11-26T04:07:08+00:00 List-Id: Pascal Obry writes: > Yes. Scanner has a privately defined discriminant. So the public view of > Scanner must be declared unconstrained. Right, but that's not the reason I did it. This is the "limited and indefinite" idiom, to force the object to be initialized explicitly, using one of the primitive operations defined for the type. > It is for gaining write access to function in parameter. A simpler > solution is: I prefer Jean-Pierre's canonical technique (see the CLA archives from the fall of '99 when the term "Rosen Trick" was coined), but your mileage might vary.