From: tseaver at palladion.com (Tres Seaver)
Date: Wed, 28 Apr 1999 23:21:41 -0500
Subject: Emulating C++ coding style
References: <371F8FB7.92CE674F@pk.highway.ne.jp> <slrn7hvbbu.bmd.wtanksle@dolphin.openprojects.net> <3720675C.FF7A9E99@gssec.bt.co.uk> <slrn7i7r00.10d.wtanksle@dolphin.openprojects.net>
Message-ID: <3727DE55.EA5B4BAF@palladion.com>
X-UID: 1648                                                  

William Tanksley wrote:
> 
> On Fri, 23 Apr 1999 13:28:12 +0100, Alan Gauld wrote:

<<snip>>

> 
> >> In proper C++, your const will be contained inside a class (probably
> >> static) to keep it out of the global namespace.
> 
> >Hopefully not. It should be contained within a C++ namespace.
> 
> Okay, I'll bite.  Why "hopefully not" a class?  I know namespaces are new
> and cool, but classes seem to have done the job very well in the past.
> Have they been secretly causing bloat in our code all along ;-)?

Classes are semantically "heavier" than namespaces:  by design, they exist to
classify objects.  Classes which exist only to scope other names (typedefs,
constants, free functions), while a decent workaround before the ANSI standard,
are now less attractive (they can't be reopened, for one thing).

-- 
=========================================================
Tres Seaver         tseaver at palladion.com    713-523-6582
Palladion Software  http://www.palladion.com




