comp.lang.ada
 help / color / mirror / Atom feed
From: Maciej Sobczak <see.my.homepage@gmail.com>
Subject: Re: Generics with concrete and class-wide types
Date: Tue, 1 Apr 2008 02:51:19 -0700 (PDT)
Date: 2008-04-01T02:51:19-07:00	[thread overview]
Message-ID: <881a8e2c-01b2-462d-907b-f0887943acf4@a70g2000hsh.googlegroups.com> (raw)
In-Reply-To: 10v8f09pvzjs6$.1r7fruma1fer5$.dlg@40tude.net

On 1 Kwi, 11:42, "Dmitry A. Kazakov" <mail...@dmitry-kazakov.de>
wrote:

> Just a small side note. If you care about performance you should do exactly
> the opposite you tried to, i.e. you should instantiate it with a specific
> type rather than with a class of.

This is exactly what I want to do.
If I have the knowledge of the specific iterator type, I want to
instantiate the subprogram with this specific type to facilitate
direct dispatch and code inlining.
When the only this I have is 'Class, then I want to instantiate the
subprogram with what I have and agree for indirect dispatch to
iterator operations within the subprogram body.

The question is whether it is possible in Ada without walking on the
edge of compiler conformance - and in particular without accidentally
benefiting from any compiler bug that will bite me later on when it's
fixed.
Yes, some bugs can be harmful after they are fixed. :-)

I will try the scheme proposed by Georg.

--
Maciej Sobczak * www.msobczak.com * www.inspirel.com



  reply	other threads:[~2008-04-01  9:51 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-03-31 20:22 Generics with concrete and class-wide types Maciej Sobczak
2008-03-31 23:38 ` Adam Beneschan
2008-04-01 20:10   ` Randy Brukardt
2008-04-01 21:17     ` Adam Beneschan
2008-04-01  0:23 ` Randy Brukardt
2008-04-01  3:57   ` Eric Hughes
2008-04-01  6:58     ` christoph.grein
2008-04-01  7:22 ` Georg Bauhaus
2008-04-01  9:42 ` Dmitry A. Kazakov
2008-04-01  9:51   ` Maciej Sobczak [this message]
2008-04-01 10:53     ` 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