comp.lang.ada
 help / color / mirror / Atom feed
From: Ed Avis <epa98@doc.ic.ac.uk>
Subject: Re: GPL and "free" software
Date: 1999/05/02
Date: 1999-05-02T20:59:19+00:00	[thread overview]
Message-ID: <372CBCA7.52206CB5@doc.ic.ac.uk> (raw)
In-Reply-To: 925653268snz@vision25.demon.co.uk

Phil Hunt wrote:

>>If the program instantiates a List of Int, then the code for
>>List is called and passed pointers (or references) to Ints.  If the
>>program wants a List of Char, then the same object code can be used,
>>being passed pointers to Chars.

>I think you've got it horribly wrong (there might be C++ compilers
>that work like that, but I imagine they are very rare, produce slow code
>and are horrible to implement).
>
>What C++ does is constructs code for the template with T changed to
>int, compiles it, and produces code for the template with T changed
>to char, and compiles that as well.

I see.  That seems a much less efficient way to do things, but what do
I know about compiler design?  I'm sure that not every language
supporting generic types does it this way.  For a start, some are
interpreted.

You've convinced me that a program compiled, and dynamically linked,
against a library containing template classes really does contain bits
of that library embedded in the program code.  I think you could
probably work around this, by creating a thin wrapper:

class List_wrapper
  method add(Object o) (or void *)
    call List.add(o)
  end method
(etc.)

and then substitute List_wrapper for List everywhere in your program. 
The object code for List_wrapper would contain bits of code from List,
but the rest of your program would not, and you could link the two
together at runtime.  You lose the benefit of template type-checking
this way, but AFAIK, it's only used at compile time, not runtime (at
least in C++), so you could develop without the wrapper, then stick it
in for your final release.

-- 
Ed Avis
Advertise here! epa98@doc.ic.ac.uk




  reply	other threads:[~1999-05-02  0:00 UTC|newest]

Thread overview: 162+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1999-04-20  0:00 air traffic control software Terry J. Westley
1999-04-21  0:00 ` Kevin Rigotti
1999-04-21  0:00   ` Robert Dewar
1999-04-21  0:00     ` GPL and "free" software (was: air traffic control software) Terry J. Westley
1999-04-21  0:00       ` bill
1999-04-23  0:00         ` Robert Dewar
1999-04-23  0:00         ` Robert Dewar
1999-04-23  0:00           ` Larry Kilgallen
1999-04-23  0:00             ` Robert Dewar
1999-04-23  0:00           ` Tom Moran
1999-04-24  0:00             ` Florian Weimer
1999-04-25  0:00               ` Robert Dewar
1999-04-26  0:00                 ` GPL and "free" software Nick Roberts
1999-04-26  0:00                   ` Robert Dewar
1999-04-26  0:00                   ` Phil Hunt
1999-04-27  0:00                     ` Robert Dewar
1999-04-27  0:00                       ` Ronald Cole
1999-04-26  0:00                   ` spblunt
1999-04-26  0:00                     ` Barry Margolin
1999-04-26  0:00                     ` Tim Smith
1999-04-26  0:00                       ` Kenneth P. Turvey
1999-04-27  0:00                         ` Robert Dewar
1999-04-27  0:00                           ` Barry Margolin
1999-05-02  0:00                             ` Mitch Blevins
1999-05-02  0:00                               ` Sam Holden
1999-05-03  0:00                                 ` Barry Margolin
1999-04-26  0:00                       ` Robert Dewar
1999-04-27  0:00                       ` Phil Hunt
1999-04-27  0:00                         ` David Kastrup
1999-04-27  0:00                           ` Robert Dewar
1999-04-27  0:00                             ` Lynn Winebarger
1999-05-05  0:00                             ` Richard E. Hawkins Esq.
1999-04-27  0:00                           ` Lynn Winebarger
1999-04-26  0:00                     ` Robert Dewar
1999-04-26  0:00                   ` Robert Dewar
1999-04-26  0:00                   ` Tim Smith
1999-04-26  0:00                   ` Florian Weimer
1999-04-26  0:00                   ` Paul Hughett
1999-04-26  0:00                     ` Robert Dewar
1999-04-26  0:00                       ` Paul Hughett
1999-04-26  0:00                         ` Robert Dewar
1999-04-27  0:00                           ` spblunt
1999-04-27  0:00                             ` Robert Dewar
1999-04-27  0:00                           ` Lynn Winebarger
1999-04-26  0:00                             ` Tim Smith
1999-04-27  0:00                             ` Barry Margolin
1999-04-27  0:00                               ` Lynn Winebarger
1999-04-27  0:00                           ` Paul Hughett
1999-04-27  0:00                             ` Barry Margolin
1999-04-27  0:00                               ` Paul Hughett
1999-04-27  0:00                                 ` Joshua E. Rodd
     [not found]                                   ` <7g5qgg$n7t@www.inetnow.net>
1999-04-28  0:00                                     ` Joshua E. Rodd
1999-04-28  0:00                                       ` Robert Dewar
1999-04-28  0:00                                         ` Joshua E. Rodd
1999-04-29  0:00                                           ` Robert Dewar
1999-04-29  0:00                                             ` David Starner
1999-04-29  0:00                                               ` Robert Dewar
1999-04-29  0:00                                             ` Lynn Winebarger
1999-04-29  0:00                                               ` Joshua E. Rodd
1999-04-30  0:00                                                 ` Lynn Winebarger
1999-05-05  0:00                                               ` Richard E. Hawkins Esq.
1999-05-05  0:00                                                 ` Robert Dewar
1999-05-05  0:00                                                   ` Richard E. Hawkins Esq.
1999-05-06  0:00                                                     ` Robert Dewar
1999-05-06  0:00                                                       ` Barry Margolin
1999-05-06  0:00                                                         ` Robert Dewar
1999-05-06  0:00                                                           ` Barry Margolin
1999-05-06  0:00                                                             ` Robert Dewar
1999-05-06  0:00                                                               ` Barry Margolin
1999-05-06  0:00                                                                 ` Robert Dewar
1999-05-06  0:00                                                                   ` Roger Espel Llima
1999-05-07  0:00                                                                     ` Robert Dewar
1999-05-07  0:00                                                                       ` Barry Margolin
1999-05-07  0:00                                                                       ` dennison
1999-05-06  0:00                                                         ` Robert Dewar
     [not found]                                             ` <7gdv6m$1fid$1@Mercury.mcs.net>
1999-05-03  0:00                                               ` [O/T 4 cla] " Joshua E. Rodd
     [not found]                                                 ` <7gkmt5$e8t@www.inetnow.net>
1999-05-03  0:00                                                   ` Joshua E. Rodd
     [not found]                                                     ` <7gnb7u$hlu@www.inetnow.net>
1999-05-04  0:00                                                       ` Leslie Mikesell
1999-05-05  0:00                                                         ` Robert Dewar
1999-05-05  0:00                                                           ` Leslie Mikesell
1999-05-06  0:00                                                             ` Robert Dewar
1999-05-08  0:00                                                               ` Leslie Mikesell
1999-05-08  0:00                                                                 ` Robert Dewar
1999-05-10  0:00                                                                   ` Leslie Mikesell
1999-05-11  0:00                                                                     ` Robert Dewar
1999-05-10  0:00                                                                       ` Leslie Mikesell
1999-05-11  0:00                                                                     ` Robert Dewar
1999-05-10  0:00                                                                       ` Leslie Mikesell
1999-05-11  0:00                                                                         ` Robert Dewar
1999-05-11  0:00                                                                           ` Leslie Mikesell
1999-05-12  0:00                                                                             ` Robert Dewar
1999-05-04  0:00                                                   ` James Youngman
1999-05-06  0:00                                                     ` Robert Dewar
1999-05-04  0:00                                                 ` James Youngman
1999-05-06  0:00                                                   ` Robert Dewar
1999-05-06  0:00                                             ` Robert A Duff
1999-05-06  0:00                                               ` Robert Dewar
1999-05-07  0:00                                                 ` Joshua E. Rodd
1999-05-08  0:00                                                   ` dewarr
1999-05-18  0:00                                                     ` Joshua E. Rodd
     [not found]                                       ` <7g7ro3$q91@www.inetnow.net>
1999-04-28  0:00                                         ` Joshua E. Rodd
1999-04-28  0:00                                         ` Lynn Winebarger
1999-04-29  0:00                                           ` Robert Dewar
     [not found]                                             ` <7g8ip8$skl@www.inetnow.net>
1999-04-29  0:00                                               ` Barry Margolin
1999-04-29  0:00                                                 ` [Offtopic for cl.ada] " Joshua E. Rodd
1999-04-30  0:00                                                 ` Paul Hughett
1999-04-30  0:00                                                   ` Robert Dewar
1999-04-29  0:00                                             ` Lynn Winebarger
1999-04-29  0:00                                               ` Aidan Skinner
1999-05-08  0:00                                           ` dewarr
1999-04-28  0:00                                 ` Barry Margolin
1999-04-28  0:00                                   ` Lynn Winebarger
1999-04-28  0:00                                     ` Joshua E. Rodd
1999-04-29  0:00                                       ` Robert Dewar
1999-04-29  0:00                                         ` Robert A Duff
1999-04-29  0:00                                           ` Barry Margolin
1999-04-28  0:00                                     ` Samuel Mize
1999-04-28  0:00                                     ` Samuel Mize
1999-04-29  0:00                                       ` Robert Dewar
1999-04-29  0:00                                     ` Paul Hughett
1999-04-29  0:00                                     ` Fraser Wilson
1999-04-29  0:00                                       ` Ed Avis
1999-04-29  0:00                                         ` David Starner
1999-04-29  0:00                                           ` Ed Avis
1999-04-29  0:00                                             ` David Starner
1999-04-30  0:00                                               ` Ed Avis
1999-04-30  0:00                                                 ` Barry Margolin
1999-04-30  0:00                                                   ` Ed Avis
     [not found]                                                     ` <R5qW2.242$jw4.22063@burlma1-snr2>
     [not found]                                                       ` <372ADEED.D907754@doc.ic.ac.uk>
1999-05-03  0:00                                                         ` Joshua E. Rodd
1999-05-04  0:00                                                           ` Ed Avis
1999-05-04  0:00                                                             ` Barry Margolin
1999-05-04  0:00                                                               ` Ed Avis
1999-05-04  0:00                                                                 ` Barry Margolin
1999-05-08  0:00                                                                   ` dewarr
1999-05-04  0:00                                                                 ` Peter Seebach
1999-05-04  0:00                                                         ` Alan Braggins
1999-05-01  0:00                                                 ` Phil Hunt
1999-05-02  0:00                                                   ` Ed Avis
1999-05-02  0:00                                                     ` Ole-Hjalmar Kristensen
1999-05-02  0:00                                                     ` Phil Hunt
1999-05-02  0:00                                                       ` Ed Avis [this message]
1999-05-03  0:00                                                         ` dennison
1999-05-02  0:00                                                   ` Andy Isaacson
1999-05-03  0:00                                                     ` Robert Dewar
1999-04-29  0:00                                             ` Robert Dewar
1999-04-29  0:00                                             ` Joshua E. Rodd
1999-04-29  0:00                                         ` Robert Dewar
1999-04-30  0:00                                           ` Ed Avis
1999-04-29  0:00                                         ` Barry Margolin
1999-04-30  0:00                                     ` spblunt
1999-04-30  0:00                                       ` David Kastrup
1999-04-27  0:00                             ` David Kastrup
1999-04-21  0:00       ` GPL and "free" software (was: air traffic control software) dennison
     [not found] ` <DXqW2.244$jw4.22256@burlma1-snr2>
     [not found]   ` <7gdln1$vna$1@jetsam.uits.indiana.edu>
     [not found]     ` <372ADFBD.4F4C241B@doc.ic.ac.uk>
     [not found]       ` <7gff2f$8o2@www.inetnow.net>
1999-05-01  0:00         ` GPL and "free" software Ed Avis
1999-05-03  0:00         ` Joshua E. Rodd
1999-05-01  0:00       ` Lynn Winebarger
     [not found]       ` <m2zp3pat3q.fsf@mailhost.neuroinformatik.ruhr-uni-bochum.de>
1999-05-03  0:00         ` Joshua E. Rodd
1999-05-04  0:00           ` Ed Avis
1999-05-04  0:00           ` Larry Kilgallen
1999-05-03  0:00     ` Barry Margolin
     [not found] ` <7gdd9e$36l$1@flotsam.uits.indiana.edu>
     [not found]   ` <372ADF48.B3C88507@doc.ic.ac.uk>
1999-05-04  0:00     ` Nick Roberts
1999-05-07  0:00       ` Robert Dewar
replies disabled

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