[prev in list] [next in list] [prev in thread] [next in thread] 

List:       gtkmm
Subject:    Re: [Re: [Re: [gtkmm] gnome-- and gcc-3.0]]
From:       Carl Nygard <cjnygard () fast ! net>
Date:       2001-06-25 12:58:10
[Download RAW message or body]

On 23 Jun 2001 16:29:17 +0000, Murray Cumming wrote:
> Joe Yandle <jwy@divisionbyzero.com> wrote:
> > > 
> > > *Never* add using in a header file. It defeats the point of namespaces
> > > and breaks user code. Qualify everything.
> > > 
> > 
> > In my own code, I agree with you fully.  However, I don't have to worry
> > about supporting older compilers.  IIRC, there was a very long discussion
> > about how to deal with old and new compilers immediately after RH7 was
> > released.  Does anyone remember what the conclusions of that debate were?
> > (my brain is entirely too dead right now to search the archives myself, i 
> > just got back from ansterdam ;)
> 
> I also find these using statements very distasteful, but it seems to be an
> established solution for Gtk-- and Gnome--. I would argue to use no using
> statements and qualify everything for the next generation of Gtk-- and
> Gnome--.

Well, I agree.  However, I'm not sure it's possible if you want to
support older compilers.  I know between HP, DEC and various
incarnations of g++ that the degree of support of std namespace is
amazingly random.  I can't remember which is which, but for example:
 - one compiler supports std except for string ops
 - one compiler doesn't even implement stringstream
 - one compiler doesn't implement numeric_limits<>
 - g++ implements templates outside of standard library/STL

And of course older compilers don't support std at all.  So finding
something that will compile correctly in all cases becomes virtually
impossible to do nicely.  Ultimately, it seems you're forced to code to
the lowest common denominator, so to speak, so you wind up importing
everything into the global namespace with the 'using namespace std;'.


_______________________________________________
to unsubscribe or change your subscription parameters :
http://lists.sourceforge.net/lists/listinfo/gtkmm-main

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic