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=-0.3 required=5.0 tests=BAYES_00, REPLYTO_WITHOUT_TO_CC autolearn=no autolearn_force=no version=3.4.4 X-Google-Thread: 103376,c08a7609345f4e5 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!proxad.net!feeder1-2.proxad.net!newsfeed.straub-nv.de!noris.net!newsfeed.arcor.de!newsspool2.arcor-online.net!news.arcor.de.POSTED!not-for-mail From: "Dmitry A. Kazakov" Subject: Re: Limited use for limited with? Newsgroups: comp.lang.ada User-Agent: 40tude_Dialog/2.0.15.1 MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Reply-To: mailbox@dmitry-kazakov.de Organization: cbb software GmbH References: <853314bc-0f79-435f-86a5-d7bcdd610731@c10g2000yqh.googlegroups.com> <36e886fa-b272-461f-bf86-a6b18366b64f@i5g2000yqe.googlegroups.com> Date: Tue, 28 Sep 2010 15:45:53 +0200 Message-ID: <1eug9v5h5mf8d$.ud00hrz48lyr.dlg@40tude.net> NNTP-Posting-Date: 28 Sep 2010 15:45:53 CEST NNTP-Posting-Host: 3251eecb.newsspool2.arcor-online.net X-Trace: DXC=b7QHAZ9oQ>JWDmlTRbh@=IA9EHlD;3YcB4Fo<]lROoRA8kF On Tue, 28 Sep 2010 05:59:59 -0700 (PDT), Maciej Sobczak wrote: > Hiding the use of access values behind the scenes (by virtue of tagged > types being always passed by reference) would obstruct the code > without clear benefit. The benefit is clear - no access types. > This is what AWS does in its other versions of > Start, but I don't like it. > > I want to express this: > > 1. Object is an interface type for the callback that will be > implemented by user. > 2. Object_Access is a type that will be used for declaring and passing > around callback references. I don't want everybody to define their own > types for what is a common functionality. You should register the object itself rather than its pointer. Use a constructing function which registers the object by placing it in a list or do an explicit call to Register. Upon finalization Finalize would remove it from there. The type of the object must be limited of course. This is the schema I am using. > BTW - it is exactly for the fact that there is little need for dynamic > allocation that Object_Access has to be "access all" and not just > "access". I tend to avoid "all" everywhere I can. -- Regards, Dmitry A. Kazakov http://www.dmitry-kazakov.de