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,INVALID_MSGID autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 1025b4,43ae7f61992b3213 X-Google-Attributes: gid1025b4,public X-Google-Thread: 103376,faf964ea4531e6af X-Google-Attributes: gid103376,public From: Ed Avis Subject: Re: GPL and "free" software Date: 1999/04/30 Message-ID: <3729D0F6.3DF2CCED@doc.ic.ac.uk>#1/1 X-Deja-AN: 472739242 Content-Transfer-Encoding: 7bit References: <7fibd5$jc7$1@news2.tor.accglobal.net> <7g5cb2$bjn$1@netnews.upenn.edu> <7g7o6d$lrj$1@flotsam.uits.indiana.edu> <925402294.548.49@news.remarQ.com> <3728AAFA.FAD4A827@doc.ic.ac.uk> <3728B4BE.EE06316C@aasaa.ofe.org> <3728C535.4AFA09C2@doc.ic.ac.uk> <3728C588.D779258F@aasaa.ofe.org> Content-Type: text/plain; charset=us-ascii X-Complaints-To: usenet@doc.ic.ac.uk X-Trace: lux.doc.ic.ac.uk 925487350 12273 146.169.49.16 (30 Apr 1999 15:49:10 GMT) Organization: Mime-Version: 1.0 NNTP-Posting-Date: 30 Apr 1999 15:49:10 GMT Newsgroups: comp.lang.ada,gnu.misc.discuss Date: 1999-04-30T15:49:10+00:00 List-Id: David Starner wrote: >In C terms, it would be similar to a "library" that was full of macros - >for example: > >#define sqrt(a) ({int i; i = a/2; do {a = i/a;} \ > while (a*a - i > .1); i}) > >You could write most of the C library that way. Now, that would >embed a significant amount of code into the application in a way >that dynamic linking wouldn't help. This is effectively what >C++ templates and Ada generics do, but at a higher level. Surely not! I'm sure that templates are implemented in a slightly more sensible way than by cutting and pasting object code - or is this not what you meant?. Can't you write a template class in C++, and put it in a dynamically linked library? I know that MFC, for example, includes template classes and yet is in a DLL. -- Ed Avis