From: alan.gauld at gssec.bt.co.uk (Alan Gauld)
Date: Fri, 23 Apr 1999 13:28:12 +0100
Subject: Emulating C++ coding style
References: <371F8FB7.92CE674F@pk.highway.ne.jp> <slrn7hvbbu.bmd.wtanksle@dolphin.openprojects.net>
Message-ID: <3720675C.FF7A9E99@gssec.bt.co.uk>
X-UID: 1322                                                  

> >2. stream class
> >  e.g. cout << "hello python."<<endl;
> 
> VERY bad idea.  Bad even in C++.

Why?
Its one of the 'improvements' over C that allows 
overridding of the << operator so that you can 
write a class to any stream. Python does similar 
with the _str_ mechanism but that doesn't allow 
chaining of types together, which I do like in C++

so why is it a bad idea?

Since its off-topic for the group respond by email 
if you want...

> 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.

Alan G.

-- 
=================================================
This post represents the views of the author 
and does not necessarily accurately represent 
the views of BT.




