[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: GCC



Mike M <linux-support@earthlink.net> writes:

> I really must read up more on the namespace feature and why I'd
> want to change the standard namespace. Googling around I find a 
> 1998 email that reports pre-standard C++ will soon die. In 2004
> I see the Mozilla coding standard recommend against using the 
> namespace feature because it is not implemented well on all C++ 
> compilers that they use.  Six years have past and the standard
> C++ is still not embedded where it counts - in the compilers.

The C++ standard didn't get established until 1998.  As other has
pointed out, Mozilla project was started in 1998. No wonder
they didn't want to include namespaces.  

And the standard is getting embedded where it counts - in the compilers.
GCC will give a warning if you include iostream.h.  If you want to use
any of the C++ features (streams, anything from the standard library
etc), you are forced to deal with the std namespace.  And this isn't
just true for GCC, but also VisualC++ (7.0 and up), aCC, Sun Forte C++,
Comeau. I'm not familiar with never Borland and IBM, but they are both
claming at least 90% compliance with the standard, so I'm guessing that
they have everything in the std namespace too.

> A standards committee out of touch with the compiler makers?
> Compiler writers can't sell new copies of the compiler based
> on the usefulness of namespace.  Users won't upgrade because
> the namespace feature is not worth the upgrade cost.  GNU
> glosses over the .h issue by creating a sans .h wrapper file
> for the .h file.

I really don't understand your argument. People are upgrading.
VisualC++ was worth upgrading because if its standard compliance.
RedHat jumped the gun and installed 2.96 because their customers wanted
a more compliant GCC C++ compiler. One of the selling points of Comeau's
compiler is that it is THE most compliant C++ compiler out there.

> As far as I can tell, we have to stop using the .h files so
> we can use a feature that we probably don't need and may not
> even be supported in our compiler.

If your compiler isn't standard compliant, what's the point in using it?

-- 
John L. Fjellstad
web: http://www.fjellstad.org/          Quis custodiet ipsos custodes



Reply to: