Newsgroups: comp.lang.c++,comp.lang.smalltalk,comp.object
Path: cantaloupe.srv.cs.cmu.edu!das-news2.harvard.edu!news2.near.net!news.mathworks.com!uunet!cherokee!da_vinci!lookout!tblanch
From: tblanch@lookout (Todd Blanchard)
Subject: Re: C++ Productivity
Message-ID: <D3nAEr.5tp@da_vinci.ecte.uswc.uswest.com>
Followup-To: comp.lang.c++,comp.lang.smalltalk,comp.object
Sender: news@da_vinci.ecte.uswc.uswest.com (IT Netnews)
Nntp-Posting-Host: lookout
Organization: US WEST Information Technologies
X-Newsreader: TIN [version 1.2 PL2]
References: <1995Jan23.193745.7044@boole.com> <jim.fleming.84.00133AB6@bytes.com> <1995Jan25.201226.28856@rcmcon.com> <jim.fleming.75.0003AF13@bytes.com> <3gls1u$p2l@osfa.aber.ac.uk> <1995Feb1.184049.16332@rcmcon.com> <D3E33s.DCp@da_vinci.ecte.uswc.uswes <1995Feb6.113136@di.epfl.ch> <3h759i$fg3@uuneo.neosoft.com>
Date: Tue, 7 Feb 1995 19:35:15 GMT
Lines: 33
Xref: glinda.oz.cs.cmu.edu comp.lang.c++:111535 comp.lang.smalltalk:20502 comp.object:26337

tseaver@NeoSoft.com wrote:
: In <1995Feb6.113136@di.epfl.ch>, Robb.Nebbe@di.epfl.ch (Robb Nebbe) writes:
: >

: You don't want operator= for your class, just make the private and don't 
: implement it:  I guarantee that event if you think up some way to fool the
: compiler and call it, the linker will pitch a fit!

Yes, but easy to forget sometimes.  Always floss your teeth too?
Howabout backup your hard drive?  Ever forget to zip up?  Embarrassing
when you forget but make no mistake: people are prone to forget
sometimes.

: Cardinal rule:  Always build copy constructor, destructor, and assignment operator;
: 		failing to do so, like failing to vote, invalidates your right to
: 		complain about the results! <g>

C++ is perhaps the only language I know of that writes functions behind
my back.  (Calls 'em too).  I'd prefer the policy "If he didn't write
it, it can't happen".  In fact, I understand the standards committee has
proposed yet another key word to bandaid this problem:

void f(const foo&);
class foo
{
	foo(int);  // compiler may construct a foo from int when calling f()
	explicit foo(unsigned char); // compliler may not construct a foo
	from uchar when calling f()
};

Talk about feeping creaturism.

Todd Blanchard
