Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!tut.cis.ohio-state.edu!rutgers!mcnc!thorin!coggins!coggins From: coggins@coggins.cs.unc.edu (Dr. James Coggins) Newsgroups: comp.lang.c++ Subject: Re: Sharing classes (was C++ LIBRARY/TOOL SURVEY) Message-ID: <7101@thorin.cs.unc.edu> Date: 4 Mar 89 14:35:59 GMT References: <1989Feb27.090941.18193@LTH.Se> <2491@crete.cs.glasgow.ac.uk> Sender: news@thorin.cs.unc.edu Reply-To: coggins@coggins.UUCP (Dr. James Coggins) Organization: University Of North Carolina, Chapel Hill Lines: 71 In article <2491@crete.cs.glasgow.ac.uk> orr@cs.glasgow.ac.uk (Fraser Orr) writes: >In article <1989Feb27.090941.18193@LTH.Se> dag@Control.LTH.Se (Dag Bruck) writes: >>We all want good, reusable C++ class libraries, and other useful tools. >>I've expected to see a lot, but so far in vain. Now it's time to find out! >> >I have discussed with various people why OOP class sharing hasn't >taken off in the way it was expected to, one of the main reasons I've >found is self conciousness, that is they don't want people to see the >disgusting hacks that most programmers produce. > Some time ago I made similar points in the article where I posted my FFT server code. There were no responses and there have been no followups with postings of other interesting classes. Programming is still very much a private art, not a public practice (tip of the hat to Gerald Weinberg). A deeper reason for the lack of class sharing, though, is that while classes are intended to insulate users from implementation details when we are WRITING client applications, we are most assuredly not so insulated when we are RUNNING shared code in our client applications. The operation of the application strongly depends on the implementation in the shared code. (Why do all Smalltalk programs have the same look and feel?). We are as yet unwilling to completely abrogate control unless the shared code provides something more valuable than control. I still think that sharing of low-level classes faces insurmountable problems that can be stated in economic terms: I won't "buy" your stack or linked list class because it would cost me control and return little benefit (because those are small, easy classes to write myself, and if I write them I understand -control- them). The most successful set of shared classes, the Smalltalk hierarchy, contains small classes, but the corpus is large enough to compensate the loss of control with the ability to rapidly prototype a multitude of interesting client applications. There is nothing better for general-purpose prototyping, but it is not hard to develop something better for any specific application area. Here's a proposal for consideration that takes into account the vague public-spirited desire and critical technical need to share software noted by Dag Bruck while also acknowledging the reality of the notable lack of code postings (other than my fft_server) and the self-consciousness noted by Fraser Orr above: Don't share code. Offer sets of header files. Let interested parties contact you about code if they decide they want it. We might get beyond the self-consciousness and, perhaps, get *moving* on this whole issue of code sharing by SHARING ARCHITECTURES as embodied in related sets of class definitions (our .h files) and letting other folks provide their own implementations. That way we gain the benefits of the experience and expertise of great designers by adopting their clever architectures without abrogating control or adopting an implementation that does not really meet our needs. And we don't expose our tacky code hacks to universal criticism. Publishing architectures for free might actually serve as an advertisement for a body of code that people might in fact "buy" or even $buy$ while providing a public service for those whose needs require some different kind of implementation. Comments are, of course, invited. --------------------------------------------------------------------- Dr. James M. Coggins coggins@cs.unc.edu Computer Science Department Question: "How 'bout them HEELS?" UNC-Chapel Hill correct response: Chapel Hill, NC 27599-3175 "How 'BOUT them Heels?" and NASA Center of Excellence in Space Data and Information Science ---------------------------------------------------------------------