From: "Martin Krischik" <krischik@users.sourceforge.net>
Subject: Re: How to pass around access types to interfaces?
Date: Sun, 26 Oct 2008 16:50:39 +0100
Date: 2008-10-26T16:50:39+01:00 [thread overview]
Message-ID: <op.ujm2apryz25lew@macpro.krischik.com> (raw)
In-Reply-To: wccej24uxsi.fsf@shell01.TheWorld.com
Am 26.10.2008, 00:15 Uhr, schrieb Robert A Duff
<bobduff@shell01.theworld.com>:
> "Martin Krischik" <krischik@users.sourceforge.net> writes:
>
>> Am 24.10.2008, 13:45 Uhr, schrieb Sven <sven.weidauer@gmail.com>:
>>
>>> type My_Interface_Access is access all My_Interface'Class;
>>
>> Do you realy need an access type? Read:
>>
>> http://en.wikibooks.org/wiki/Ada_Programming/Object_Orientation#The_class-wide_type
>>
>> If so, does it need to be an access all? Read:
>
> In my experience, access-to-class-wide types almost always need to have
> "all", because you often want to convert from access-to-T2 up to
> access-to-T1'Class (where T2 is a descendant of T1).
I guess you are right here. But then: access to class wide is the kind of
access which a C++ convert will uses without realy needing them. I should
know, I am a C++ convert who made precisely that mistake.
Martin
--
Martin Krischik
next prev parent reply other threads:[~2008-10-26 15:50 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-10-24 11:45 How to pass around access types to interfaces? Sven
2008-10-24 12:24 ` Niklas Holsti
2008-10-24 12:49 ` Sven
2008-10-24 13:55 ` Ludovic Brenta
2008-10-24 21:32 ` sjw
2008-10-25 8:54 ` Sven
2008-10-25 15:43 ` Martin Krischik
2008-10-25 22:15 ` Robert A Duff
2008-10-26 8:02 ` Dmitry A. Kazakov
2008-10-26 15:50 ` Martin Krischik [this message]
2008-10-28 13:41 ` Maciej Sobczak
2008-10-29 14:15 ` Martin Krischik
2008-10-31 13:38 ` Maciej Sobczak
2008-10-31 14:46 ` Dmitry A. Kazakov
2008-10-29 12:42 ` Sven
2008-10-29 13:17 ` Dmitry A. Kazakov
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox