home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.lang.c++
- Path: sparky!uunet!cis.ohio-state.edu!zaphod.mps.ohio-state.edu!sol.ctr.columbia.edu!destroyer!gumby!yale!yale.edu!qt.cs.utexas.edu!cs.utexas.edu!bcm!rice!amitp
- From: amitp@rice.edu (Amit J. Patel)
- Subject: Re: PROPOSAL: Hidden private parts of classes
- Message-ID: <BxAt2x.HG6@rice.edu>
- Originator: amitp@aten.cs.rice.edu
- Sender: news@rice.edu (News)
- Reply-To: amitp@owlnet.rice.edu
- Organization: Rice University
- References: <1992Oct30.113234.15010@daimi.aau.dk> <1992Nov2.170018.12614@unix.brighton.ac.uk> <1992Nov4.200426.24424@netcom.com>
- Distribution: usa
- Date: Fri, 6 Nov 1992 14:18:32 GMT
- Lines: 49
-
-
- In article <1992Nov4.200426.24424@netcom.com>, ort@netcom.com (David Oertel) writes:
- |>
- |> I'd like to make a pragmatic point concerning not exposing your private parts.
- |> My 15k line program brought my 33mhz 486 to its knees until I started using
- |> this technique. Header file dependencies cascade rapidly and tend to force
- |> a near full-rebuild when a header file needs changing.
- |>
- |> ort@netcom.com
- |> --
-
- Same here! :)
-
- Perhaps the solution lies in the programming environment --- maybe our
- notion of "header" and "code" files needs to be changed.
-
- Maybe:
-
-
- Public Interface .h -> gets #include-d
- Private structure .hp -> gets compiled to .op
- Code .cc -> gets compiled to .o
-
- The makefile would have two sets of files to compile:
-
- 1 - compile all .hp files to .op files; if a .hp file
- includes A.h, and A.h is changed, A.hp must be
- recompiled. This will produce a .op file which
- describes the structure to the compiler
-
- 2 - compile all .cc files to .o files; if it includes
- a .h file that needs private stuff, the compiler
- can look in the .op file for the layout. Since it's
- already parsed & converted to internal form, it should
- be fast.
-
- Does this seem reasonable? An implementor can give out .h and .op
- files, so that the user doesn't see the .hp file. The .hp file
- doesn't have to be recompiled every time, and those of us with 486s
- don't have to wait for hours recompiling. :)
-
-
-
- Amit
-
-
-
- P.S. Building my 4000 line program manages to get **150,000***
- lines after all the #includes. It drives me up the wall!
-