Path: utzoo!censor!geac!torsqnt!news-server.csri.toronto.edu!bonnie.concordia.ca!thunder.mcrcim.mcgill.edu!snorkelwacker.mit.edu!think.com!sdd.hp.com!cs.utexas.edu!sun-barr!newstop!texsun!smunews!necssd!harrison From: harrison@necssd.NEC.COM (Mark Harrison) Newsgroups: comp.lang.c++ Subject: Re: A GNU Makefile (was: ... header files **and** inline management) Message-ID: <664@necssd.NEC.COM> Date: 20 Feb 91 17:29:47 GMT References: <1991Feb5.180503.24515@mathcs.sjsu.edu> <3787@lupine.NCD.COM> <1991Feb20.083327.2028@eua.ericsson.se> Organization: NEC America Inc. SSD, Irving, TX Lines: 37 In article <1991Feb20.083327.2028@eua.ericsson.se>, euamts@eua.ericsson.se (Mats Henricson) writes: > >>... but I think this is a bad idea. > >>The most important thing with a C++ class is its interface to the outside > >>world, i.e. the header file. That is why I design the header file first, > >>and then the .cc-file. > > >And you never go back and make any changes to the "interface" part once > >you have written it for the first time!?!?!?! > > Of course I do! But, if you put enough work down on the header-file, you > don't have to change it *that* often to justify any extra feature like the > one you have suggested. I agree with Mats on this. A stable interface is one of the most important factors in being able to reuse code. I have more confidence in someone who emphasizes generating a code stub from an interface defintion than in someone who wants to write the code first and then generate the interface. The second approach is just too amenable to throwing something together, generating an interface, and calling the thing a package. Of course, for single use or special purpose code this is not important, so it would still be handy to do generate the header... Just realize that it is not the best way for "permanent" reusable code. Just imagine if Ken Thompson suddenly decided to spell "creat" with an "e". :-) > >// Ron Guilmette - C++ Entomologist > Mats Henricson / SWEDEN - Home of the perfect programmer ;-) -- Mark Harrison harrison@necssd.NEC.COM (214)518-5050 {necntc, cs.utexas.edu}!necssd!harrison standard disclaimers apply...