🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.std.c++
Article #18

Re: PROPOSAL: Hidden private parts of classes

#18
From: Brian McCauley
Date: Fri, 30 Oct 1992 19:06
27 lines
2159 bytes
In article <1992Oct30.113234.15010@daimi.aau.dk>, sabroe@daimi.aau.dk (Morten Sabroe Mortensen) writes:
>         Lately I've coded a lot of small libraries in C++, and been
> thinking, why it's not possible to hide private parts, -it doesn't 
> seem to be possible! Let me take a small example: I want to create
> a library, that is, a single header-file with some declarations to
> be used by anyone, and the implementation hidden in a .cc-file,
> -meant not to be seen by the one, who uses the declarations from the
> header-file. Nothing unusual with that.... 
>                                 ...This kind of hidden private parts
> would indeed come in handy, even though a few restrictions might be
> necessary to implement this kind of thing in current C++-compilers!
> For really large programs I belive it would matter a great deal!

Just a few restrictions... like not being able to have any objects of the type
as the compiler wouldn't know the size. inline functions would also be a
problem. Some compilers get round the problem of recompiling headers by
having `precompiled headers' which are to header files what object files are to
code files. If your concern is that you wan't to prevent programmers seeing
your privates then you'd also need to prevent them seeing the compiler's map
files. If your concern was the conpiler overhead - get a smarter compiler.

    \\   ( )  NO BULLSHIT! from BAM (Brian McCauley)          
 .  _\\__[oo  ============
.__/  \\ /\@
.  l___\\     E-mail: B.A.McCauley@bham.ac.uk
 # ll  l\\ 
###LL  LL\\
Technical Details
Message-ID: <1992Oct30.190657.1@vax1.bham.ac.uk>
Path: arc1-ca.pugleaf.net!sparky!uunet!pmafire!news.dell.com!natinst.com!cs.utexas.edu!zaphod.mps.ohio-state.edu!darwin.sura.net!paladin.american.edu!news.univie.ac.at!hp4at!mcsun!uknet!news.cs.bham.ac.uk!bham!bhamvx!mccauleyba
References: <1992Oct30.113234.15010@daimi.aau.dk>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!sparky!uunet!pmafire!news.dell.com!natinst.com!cs.utexas.edu!zaphod.mps.ohio-state.edu!darwin.sura.net!paladin.american.edu!news.univie.ac.at!hp4at!mcsun!uknet!news.cs.bham.ac.uk!bham!bhamvx!mccauleyba
From: mccauleyba@vax1.bham.ac.uk (Brian McCauley)
Newsgroups: comp.std.c++
Subject: Re: PROPOSAL: Hidden private parts of classes
Message-ID: <1992Oct30.190657.1@vax1.bham.ac.uk>
Date: 30 Oct 92 19:06:57 GMT
References: <1992Oct30.113234.15010@daimi.aau.dk>
Sender: usenet@rs6000.bham.ac.uk (USENET News Service)
Organization: University of Birmingham
Lines: 27