axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Sanjiva Weerawarana" <>
Subject c++ portability (was: Re: cvs commit: xml-axis/c/src/engine SharedObject.h ...)
Date Mon, 18 Aug 2003 00:01:46 GMT
"Steve Loughran" <> writes:
> I am +1 for x-platform code standards, but IMO the Mozilla ones are 
> outdated or driven by support for obscure platforms & C++ compilers. 
> Things have improved, not least because gcc is the defacto standard for 
> everything but Windows.
> My windows-linux-macosX code works with
> -modern ISO C++: wchar_t is a type, for(int i=0) {} scopes I to the 
> forloop, etc.
> -unicode everywhere
> -namespaces
> -no C style casts. dynamic_cast, reinterpret_cast, const_cast, etc.
> -STL datastructures. The 2003 is still buggy here *of course*
> -all exceptions derive from std::exception
> I'd drop 1,3,4,5,19 from the list, retain the rest, even #2, which is 
> not as critical as it used to be, but still good practice -as you cannot 
> predict the order things get constructed.

While you're right that portability has indeed improved with latest 
versions of operating systems, many people who are C++ types end up
having to run code that requires quite a bit of legacy. As a result,
they don't have the freedom to update operating systems and compilers
as often as they may like to. This is especially true in workhorse
scientific computing systems - once things work well and highly 
efficiently, there is little reason to "upgrade" the underlying 

So, I'm +1 to following a rigourous set of rules for portability. 
Usually it means that you may have to do a bit more work (as some
cool new features would have to be avoided) but its worth the cost
if one of the desires is to support legacy integration, especially
in cross-language environments.


View raw message