From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00 autolearn=unavailable autolearn_force=no version=3.4.4 Path: eternal-september.org!reader01.eternal-september.org!reader02.eternal-september.org!news.eternal-september.org!news.eternal-september.org!news.eternal-september.org!feeder.eternal-september.org!feeder.erje.net!eu.feeder.erje.net!newspeer1.nac.net!border2.nntp.dca1.giganews.com!nntp.giganews.com!ottix-news.ottix.net!newsswitch.lcs.mit.edu!nntp.TheWorld.com!.POSTED!not-for-mail From: Robert A Duff Newsgroups: comp.lang.ada Subject: Re: Rough proposal to make some generic types static Date: Wed, 23 Jul 2014 17:36:28 -0400 Organization: The World Public Access UNIX, Brookline, MA Message-ID: References: <45b2d813-f991-4c1c-b280-a1037bae8a66@googlegroups.com> NNTP-Posting-Host: shell01.theworld.com Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: pcls7.std.com 1406151356 4860 192.74.137.71 (23 Jul 2014 21:35:56 GMT) X-Complaints-To: abuse@TheWorld.com NNTP-Posting-Date: Wed, 23 Jul 2014 21:35:56 +0000 (UTC) User-Agent: Gnus/5.1008 (Gnus v5.10.8) Emacs/21.3 (irix) Cancel-Lock: sha1:KD570+Le4IL7x9nml+Bmoj1+OP0= Xref: news.eternal-september.org comp.lang.ada:21164 Date: 2014-07-23T17:36:28-04:00 List-Id: Victor Porton 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