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=unavailable autolearn_force=no version=3.4.4 Path: eternal-september.org!reader01.eternal-september.org!reader02.eternal-september.org!news.eternal-september.org!news.eternal-september.org!news.eternal-september.org!feeder.eternal-september.org!usenet.blueworldhosting.com!feeder01.blueworldhosting.com!border2.nntp.dca1.giganews.com!nntp.giganews.com!ottix-news.ottix.net!newsswitch.lcs.mit.edu!nntp.TheWorld.com!.POSTED!not-for-mail From: Robert A Duff Newsgroups: comp.lang.ada Subject: Re: Quick question regarding limited type return syntax Date: Sat, 02 Aug 2014 10:34:53 -0400 Organization: The World Public Access UNIX, Brookline, MA Message-ID: References: <166aaec5-5e9c-40e0-9b07-9b9c7d5f7f33@googlegroups.com> <16a6846f-2964-438a-ab9b-2029075f7924@googlegroups.com> <20m59uxjlygw$.2mpabkt469vp.dlg@40tude.net> NNTP-Posting-Host: shell01.theworld.com Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: pcls7.std.com 1406990091 12721 192.74.137.71 (2 Aug 2014 14:34:51 GMT) X-Complaints-To: abuse@TheWorld.com NNTP-Posting-Date: Sat, 2 Aug 2014 14:34:51 +0000 (UTC) User-Agent: Gnus/5.1008 (Gnus v5.10.8) Emacs/21.3 (irix) Cancel-Lock: sha1:JbVdefjKk1xR9xF3z8fwkhwfhzQ= Xref: news.eternal-september.org comp.lang.ada:21404 Date: 2014-08-02T10:34:53-04:00 List-Id: "Dmitry A. Kazakov" writes: > On Sat, 02 Aug 2014 09:20:45 -0400, Robert A Duff wrote: > >> "Dmitry A. Kazakov" writes: >> >>>...Dispatching calls >>> through class-wide access discriminants upon initialization/finalization. >> >> Can you please give an example of what you mean? > > Components not discriminants. I had Rosen's trick in mind: > > type T is ... > Self : not null access T := T'Unchecked_Access; Sorry, I still don't get it. I don't see any class-wide types or dispatching calls there. Also, it's illegal as written (the Rosen trick is only allowed for limited types.) Perhaps a complete compilable example would help illustrate the language anomaly you are talking about. The Rosen trick allows you to obtain a variable view of a constant, but that has nothing to do with initialization/finalization, so I assume that's not what you meant. - Bob