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,FREEMAIL_FROM autolearn=ham autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,436e4ce138981b82 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2004-03-12 05:10:08 PST Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!news.uchicago.edu!news-xfer.newsread.com!nntp.abs.net!ash.uu.net!spool.news.uu.net!not-for-mail Date: Fri, 12 Mar 2004 08:09:51 -0500 From: Hyman Rosen User-Agent: Mozilla Thunderbird 0.5 (Windows/20040207) X-Accept-Language: en-us, en MIME-Version: 1.0 Newsgroups: comp.lang.ada Subject: Re: abstract sub programs overriding References: <1078845298.702789@master.nyc.kbcfp.com> <0ipr40thtf86b520a0qdi003aj87gtuhd4@4ax.com> <1078849973.701176@master.nyc.kbcfp.com> <1078924150.268074@master.nyc.kbcfp.com> <1079014276.527406@master.nyc.kbcfp.com> <67u0505uu3gfmlt8p28e9jkaco0nljquut@4ax.com> <1079019616.621636@master.nyc.kbcfp.com> <1079026002.840030@master.nyc.kbcfp.com> In-Reply-To: Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Organization: KBC Financial Products Message-ID: <1079097006.572713@master.nyc.kbcfp.com> Cache-Post-Path: master.nyc.kbcfp.com!unknown@aphelion.nyc.kbcfp.com X-Cache: nntpcache 3.0.1 (see http://www.nntpcache.org/) NNTP-Posting-Host: 204.253.250.10 X-Trace: 1079097006 22516 204.253.250.10 Xref: archiver1.google.com comp.lang.ada:6267 Date: 2004-03-12T08:09:51-05:00 List-Id: Dmitry A. Kazakov wrote: > As a matter of fact, in Ada T and T'Class are different types. I tried > to explain you that the problem with constructors in C++ is rooted in > equalizing T and T'Class. That in your universe there is no such > distinction does not mend the problem. > > ... this is why a two-stage construction is required for them. The > point is very simple - each type needs a constructor. So when T is > view-convertible to T'Class, then two constructors have to be applied: > one of T, one of T'Class. In the constructor of T you cannot dispatch, > in the constructor of T'Class you can do it safely. But this is not Ada, but AdaDK. In Ada, T'Class objects don't have their own constructors, or initializers, or anything. All T'Class objects are just a view of a (derived from) T object. Am I wrong? A declared T'Class object has to be initialized by a T actual, perhaps one returned by a T'Class function, where the return value must then be a T actual. A declared T'Class parameter is just a view of some T object. I think that once again you are making blanket statements which confuse, or conflate, aspects of Ada as they are and aspects of Ada as you wish they would be.