Xref: utzoo comp.lang.c:33397 alt.religion.computers:1991 Path: utzoo!utgpu!cs.utexas.edu!usc!zaphod.mps.ohio-state.edu!van-bc!ubc-cs!news-server.csri.toronto.edu!clyde.concordia.ca!ccu.umanitoba.ca!salomon From: salomon@ccu.umanitoba.ca (Dan Salomon) Newsgroups: comp.lang.c,alt.religion.computers Subject: Re: ANSI C prototypes Message-ID: <1990Nov3.122432.24738@ccu.umanitoba.ca> Date: 3 Nov 90 12:24:32 GMT References: <1005@christopher-robin.cs.bham.ac.uk> <1906@necisa.ho.necisa.oz> <1990Nov2.030556.27759@ccu.umanitoba.ca> Organization: University of Manitoba, Winnipeg, Canada Lines: 35 In article peter@ficc.ferranti.com (Peter da Silva) writes: >In article <1990Nov2.030556.27759@ccu.umanitoba.ca> salomon@ccu.umanitoba.ca (Dan Salomon) writes: >> You are both right. Repeatedly typing function prototypes is a tedious >> waste of time, but we really would like type errors reported at compile >> time. >> A possible solution would be to have a utility for building libraries >> of function prototypes from source code. > >Ever hear of include files? > Actually, include files aren't quite the same as a library of function prototypes. The distinction is the same as between an object library, and a file full of object modules. In addition to the problem of keeping the include files up to date, there is also the problem of filling up your symbol table with dozens of unused symbols. Processing all the prototypes in an include file is slower than a search for and processing of only the ones actually needed. This is especially a problem when a large collection of functions are grouped together in a common directory, but in separate files. Such an organization speeds up the compilation of large projects, by allowing the recompilation of only the out-of-date functions. If each of the files has to include a large number of prototypes, the some of the speed up is lost. Once your set of functions is running, what tool do you use to assemble all the prototypes into up-to-date include files? Such tools exists for object modules, perhaps similar tools are needed for function prototypes. -- Dan Salomon -- salomon@ccu.UManitoba.CA Dept. of Computer Science / University of Manitoba Winnipeg, Manitoba, Canada R3T 2N2 / (204) 275-6682