comp.lang.ada
 help / color / mirror / Atom feed
From: "Dmitry A. Kazakov" <mailbox@dmitry-kazakov.de>
Subject: Re: why can't we declare unconstrained objects ?
Date: Sun, 12 Dec 2004 20:24:31 +0100
Date: 2004-12-12T20:24:31+01:00	[thread overview]
Message-ID: <11g6tx7vp2vyt$.1nqxaiwl27g56$.dlg@40tude.net> (raw)
In-Reply-To: Ig0vd.8865$yr1.4348@newsread3.news.pas.earthlink.net

On Sun, 12 Dec 2004 18:40:40 GMT, Jeffrey Carter wrote:

> If you're interested in interpreting the same bit pattern as 2 different 
> types, this is not the mechanism Ada uses. Use Unchecked_Conversion instead.

Right, especially because the value of the discriminant will be a *part* of
the record. Same is true if you'll try to achieve it using class-wide
types. Type tag will be a part of T'Class. In short, Ada maintains
consistency of values and views. Unchecked_Conversion is mainly to
circumvent it.

-- 
Regards,
Dmitry A. Kazakov
http://www.dmitry-kazakov.de



  reply	other threads:[~2004-12-12 19:24 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-12-12 15:43 why can't we declare unconstrained objects ? Michael Mounteney
2004-12-12 17:39 ` Martin Krischik
2004-12-12 17:47 ` Dmitry A. Kazakov
2004-12-12 18:21 ` Martin Dowie
2004-12-12 18:40   ` Jeffrey Carter
2004-12-12 19:24     ` Dmitry A. Kazakov [this message]
2004-12-15 13:39 ` David Botton
2004-12-15 21:47   ` Randy Brukardt
replies disabled

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