comp.lang.ada
 help / color / mirror / Atom feed
From: Robert A Duff <bobduff@shell01.TheWorld.com>
Subject: Re: Rough proposal to make some generic types static
Date: Wed, 23 Jul 2014 17:36:28 -0400
Date: 2014-07-23T17:36:28-04:00	[thread overview]
Message-ID: <wccy4vj3ggz.fsf@shell01.TheWorld.com> (raw)
In-Reply-To: lqk2ej$3r1$4@speranza.aioe.org

Victor Porton <porton@narod.ru> writes:

> I do not say that sharing code is not useful. I say that (in my opinion) it 
> is just too hard to implement (efficiently enough) in certain cases, such as 
> when we have a formal scalar type, because its size in bytes may vary.

You could have (say) two pieces of code for the generic body, one shared
by all instances that pass a scalar that fits in 32 bits, and one shared
by all those that need 64 bits.

Or more generally, two instances of a generic could share code only if
the actual parameters are similar enough that it can be done efficiently.

- Bob


  parent reply	other threads:[~2014-07-23 21:36 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-07-21 20:44 Rough proposal to make some generic types static Victor Porton
2014-07-21 20:54 ` Victor Porton
2014-07-21 21:28   ` Niklas Holsti
2014-07-21 21:32     ` Victor Porton
2014-07-21 21:43       ` Niklas Holsti
2014-07-21 23:10       ` Randy Brukardt
2014-07-21 21:39 ` Adam Beneschan
2014-07-21 21:44   ` Victor Porton
2014-07-21 21:54     ` Adam Beneschan
2014-07-21 21:58       ` Victor Porton
2014-07-22  0:20         ` Randy Brukardt
2014-07-23 21:36         ` Robert A Duff [this message]
2014-07-21 22:06       ` Shark8
2014-07-21 23:12     ` Randy Brukardt
2014-07-22  9:53       ` AdaMagica
2014-07-22 21:10         ` 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