comp.lang.ada
 help / color / mirror / Atom feed
From: Ludovic Brenta <ludovic@ludovic-brenta.org>
Subject: Re: tagged primitive operation and freezing
Date: Tue, 16 Nov 2010 00:53:03 -0800 (PST)
Date: 2010-11-16T00:53:03-08:00	[thread overview]
Message-ID: <bc21a278-46a4-44f3-b0d1-e20d115e8a5a@a37g2000yqi.googlegroups.com> (raw)
In-Reply-To: 6d5b4fec-ac32-4efe-a9b8-02cbaca625b9@u25g2000pra.googlegroups.com

troll wrote on comp.lang.ada:
>> But only if it is tagged. untagged type, even though frozen, DOES
>> compile.

My initial reaction to this was: of course, because, if type A is
untagged,

type Flight_T is new A;

freezes Flight_T immediately since its representation is known,
therefore

procedure C is new Blah (Object_T => Flight_T);

is not primitive because not dynamically dispatching.

After re-reading 13.14, I see it does not discuss non-tagged types or
types derived from non-tagged types, so I'm not so sure about the
first part anymore.  And, per 3.2.3(6), C seems to be primitive after
all (primitive subprograms are not necessarily dynamically
dispatching).

While I intuitively agree with Adam's explanation, I can't find the
chapter and verse in the ARM that backs it; it seems like a gray area
to me.

--
Ludovic Brenta.



      reply	other threads:[~2010-11-16  8:53 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-11-13  3:24 tagged primitive operation and freezing troll
2010-11-13 10:24 ` Ludovic Brenta
2010-11-15 14:23   ` troll
2010-11-15 16:30     ` Adam Beneschan
2010-11-16  8:53       ` Ludovic Brenta [this message]
replies disabled

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