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,34cc14b2a30b4c03,start X-Google-NewGroupId: yes X-Google-Attributes: gida07f3367d7,domainid0,public,usenet X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news1.google.com!postnews.google.com!j4g2000yqh.googlegroups.com!not-for-mail From: AdaMagica Newsgroups: comp.lang.ada Subject: Wikibook on Ada Programming - Object Orientation Date: Thu, 8 Jul 2010 02:34:22 -0700 (PDT) Organization: http://groups.google.com Message-ID: <4758a0b7-21f7-4a8e-97ec-d9468d5d598f@j4g2000yqh.googlegroups.com> NNTP-Posting-Host: 80.156.44.178 Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 X-Trace: posting.google.com 1278581662 27701 127.0.0.1 (8 Jul 2010 09:34:22 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: Thu, 8 Jul 2010 09:34:22 +0000 (UTC) Cc: ludovic@ludovic-brenta.org Complaints-To: groups-abuse@google.com Injection-Info: j4g2000yqh.googlegroups.com; posting-host=80.156.44.178; posting-account=rmHyLAoAAADSQmMWJF0a_815Fdd96RDf User-Agent: G2/1.0 X-HTTP-UserAgent: Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.2; WOW64; .NET CLR 2.0.50727; .NET CLR 3.0.04506.30; .NET CLR 3.0.04506.648),gzip(gfe) Xref: g2news1.google.com comp.lang.ada:12264 Date: 2010-07-08T02:34:22-07:00 List-Id: I have a problem with an example in http://en.wikibooks.org/wiki/Ada_Programming/Object_Orientation#Multiple_Inheritance It proposes to use a mixin together with the Rosen trick, however for unlimited types. This cannot work! When such an object is assigned, the disciminant will inevitably point to the wrong object. For a detailed discussion of the problems involved, see my paper in Ada Letters, Volume XIX, Number 4, December 1999, which you can also find here: http://www.christ-usch-grein.homepage.t-online.de/Ada/Finalization.html Ada 2005 changed some of the rules; now mix-ins can have access discriminants to nonlimited types, but the problem persists. So how should the wikibook be corrected? Are there safe solutions to the problem of mixins?