Path: utzoo!utgpu!news-server.csri.toronto.edu!mailrus!uwm.edu!zaphod.mps.ohio-state.edu!usc!apple!snorkelwacker!ai-lab!rpk From: rpk@wheaties.ai.mit.edu (Robert Krajewski) Newsgroups: comp.lang.c++ Subject: C++ Linkage, Interface Issues Summary: Trivial, old, C-style mechanisms won't cut it ! Message-ID: <9714@rice-chex.ai.mit.edu> Date: 5 Aug 90 20:09:50 GMT References: <7921@tekgvs.LABS.TEK.COM> <380@taumet.com> < <1990Aug4.233013.20500@cs.columbia.edu>> <383@taumet.com> Reply-To: rpk@rice-chex.ai.mit.edu (Robert Krajewski) Organization: MIT Artificial Intelligence Laboratory Lines: 42 In article <383@taumet.com> steve@taumet.com (Stephen Clamage) writes: >aw1r+@andrew.cmu.edu (Alfred Benjamin Woodard) writes: >What we need is to get away from the current model of separate source >text files, separate object files, separate compilation, separate linking. >We need a more integrated environment. For example, typical real-world >C programs may include thousands of lines of header files for each >module, the header files processed over and over. This is very wasteful. > >The editing/compiling/linking processes could be more integrated, whereby >a database is maintained to keep track of things. As you edit a >program, it could be incrementally compiled, incrementally linked, as >you go. This would dramatically improve productivity. Hear, hear. One consequence of the current mismatch between the current separate compilation schemes and C++ is the following: if you use a data member (say, another class contained directly as a member), you have to include its associated header file, even though that class is used only internally, and none of its normally visible (public) attributes are visible in the containing classes. If you are a non-privileged user of a class, all you need to know about are its size (which, of course, means that to compute its size you must sum the size of its members, and then throw in a little overhead if some virtual functions are involved), and its public members. It would be great if you only dragged in internal information when neccesary. The access level (public, private, protected) can be determined syntactically. What is needed is a new kind of library, an interface library, that contains, effectively, a pre-digested form of what is found in header files. Of course, a new kind of library would require new code and changes to compilers, but the benefit would be the end of brainless and slow reparsing of header files. Also, all kinds of tools could be written that would give reports of the class hierarchies contained in these interface libraries. -- Robert P. Krajewski Internet: rpk@ai.mit.edu ; Lotus: robert_krajewski.lotus@crd.dnet.lotus.com