comp.lang.ada
 help / color / mirror / Atom feed
From: AdaMagica <christoph.grein@eurocopter.com>
Cc: ludovic@ludovic-brenta.org
Subject: Wikibook on Ada Programming - Object Orientation
Date: Thu, 8 Jul 2010 02:34:22 -0700 (PDT)
Date: 2010-07-08T02:34:22-07:00	[thread overview]
Message-ID: <4758a0b7-21f7-4a8e-97ec-d9468d5d598f@j4g2000yqh.googlegroups.com> (raw)

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?



             reply	other threads:[~2010-07-08  9:34 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-07-08  9:34 AdaMagica [this message]
2010-07-08 16:07 ` Wikibook on Ada Programming - Object Orientation Ludovic Brenta
2010-07-08 17:14   ` Simon Wright
2010-07-08 18:09   ` AdaMagica
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox