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.3 required=5.0 tests=BAYES_00,FREEMAIL_FROM, INVALID_MSGID autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,faf964ea4531e6af X-Google-Attributes: gid103376,public X-Google-Thread: 1025b4,43ae7f61992b3213 X-Google-Attributes: gid1025b4,public From: "Nick Roberts" Subject: Re: GPL and "free" software Date: 1999/05/04 Message-ID: <373248e6@eeyore.callnetuk.com>#1/1 X-Deja-AN: 474988974 References: <7fibd5$jc7$1@news2.tor.accglobal.net> <3729D0F6.3DF2CCED@doc.ic.ac.uk> <372A07FE.47AD7982@doc.ic.ac.uk> <7gdd9e$36l$1@flotsam.uits.indiana.edu> <372ADF48.B3C88507@doc.ic.ac.uk> X-Original-NNTP-Posting-Host: da129d169.dialup.callnetuk.com X-MimeOLE: Produced By Microsoft MimeOLE V4.72.3110.3 X-Complaints-To: newsabuse@remarq.com X-Trace: 926042255 02H499TBW8004D443C uk25.supernews.com Organization: RemarQ http://www.remarQ.com Newsgroups: comp.lang.ada,gnu.misc.discuss Date: 1999-05-04T00:00:00+00:00 List-Id: Very briefly, C++ templates and Ada generics provide a way to encode an algorithm only once, if it is the kind of algorithm which can be applied unchanged to several variations of things that are basically 'static' in languages such as C++ and Ada (types, functions/subprograms, etc.). Each such variation is called an 'instance', and setting up an instance ready for use is called 'instantiation'. C++ templates and Ada generic units work in fundamentally the same way; the biggest difference being that, in C++, templates are instantiated automatically. The usual (default) implementation is for each instantiation of a template or generic unit to cause the creation of a new piece of object code, varied according to the template/generic parameters. (This generally gives faster execution speed, but at the cost of the overall program's object code being bigger.) But, some implementations (optionally) produce a single piece of object code, which calls 'hooks' inside it to provide the variation according to the different template/generic parameters; each instantiation then simply generates a set of appropriate hooks. A pointer to one of these sets of hooks must be passed in on every call into the template/generic. (This generally gives slower speed, but reduces the size of the overall program's object code.) There are other schemes which provide a compromise between these two extremes. I think the relevant point is that, in any eventuality, if a program uses a template or generic unit, then some object code corresponding to that template or generic unit will end up in the program's object code. I feel sure it is the case that the source code for many templates and generic units will constitute an 'original and substantive work' susceptible to a claim of copyright. ------------------------------------- Nick Roberts -------------------------------------