Path: utzoo!utgpu!news-server.csri.toronto.edu!mailrus!cs.utexas.edu!tut.cis.ohio-state.edu!pt.cs.cmu.edu!andrew.cmu.edu!aw1r+ From: aw1r+@andrew.cmu.edu (Alfred Benjamin Woodard) Newsgroups: comp.lang.c++ Subject: Re: Borland Turbo C++ compile size Message-ID: Date: 5 Aug 90 04:08:18 GMT References: <7921@tekgvs.LABS.TEK.COM> <380@taumet.com>, <1990Aug4.233013.20500@cs.columbia.edu> Organization: Carnegie Mellon, Pittsburgh, PA Lines: 27 In-Reply-To: <1990Aug4.233013.20500@cs.columbia.edu> kearns@cs.columbia.edu (Steve Kearns) writes: > The "problem" with "hello world" in C++ illustrates the need for > smart linking, as provided by the Topspeed C compiler: it only includes, > in an executable, the functions and variables actually needed for the > program being linked. In contrast, all other linkers I know about today > include every function and variable defined in a file, if just 1 function > or variable is accessed. > > Since C++ encourages the creation of large robust classes, one expects > that a class implementation will contain a number of functions that > are not actually used in an application. Smart linking relieves the fear > that using a large class for a simple purpose imposes a severe penalty on > memory usage and program size. > > How about it, compiler vendors? Give us smart linking, please! > > -steve I was planning to post this to some question list but since the topic came up here I will ask the question now. From everything that I have heard smart linking seems like a really good idea. Why doesn't everybody do it? Is it extrodinarily hard to write or something? How can it deal with things like virtual functions? -ben