One clarification: Xerces is implemented using the standard C++ language.
It  exploits many features of the C++ language, but does not make much use
of the C++ standard type library (STL), which is a library of code
implemented using the language.  (I think this is what you meant, but I want
to be sure other readers understand the difference.)

One of the challenges the Xerces project has is that the code has been
ported to a wide variety of platforms (Win32, *nix, Mac, OS/2, OS/390, etc),
many of which are not available to the core development team for testing.
Add the fact that not all ports have a maintainer and it can be quite
difficult to know what level of C++ support can be relied upon.  Since the C
standard has been around a lot longer (and is simpler to boot), it's
implemented more consistently and is therefore safer to use in some cases.

For instance, namespaces are useful but not universally supported, so Xerces
allows you to use namespaces or not, in accordance with the capabilities of
your compiler (and your preference).  Making this possible took some effort,
and requires the use of conditional code.  This increased complexity, but
this was deemed acceptable because of the usefulness of namespaces.

If similar functionality is available in the C++ STL and the C run time
library (RTL), and STL is not universally available, the code will be
simplest (and therefore most maintainable) if the RTL is used.  Conditional
use of the STL makes sense only if there's a real benefit.

I guess what it comes down to is that cross-platform projects like Xerces
sometimes have to be technologically conservative in order to keep the code
manageable.  Given a choice between machine efficiency (executing the code)
and human efficiency (maintaining it), it's generally wise to choose human
efficiency.  Machines get faster every day; people don't.  One day, it may
be more human-efficient to use the STL, but that day isn't here yet.

> -----Original Message-----
> From: sebastien demers [mailto:[EMAIL PROTECTED] 
> Sent: Tuesday, September 02, 2003 9:45 PM
> To: [EMAIL PROTECTED]
> Subject: Re: posting code
> 
> 
> I didn't know that in year 2003 standard C++ library was not 
> supported in
> all common platforms and compilers. (Since the Standard was 
> published in
> 1998 and it's supported by all win32 compilers for several years)
> 
> I can imagine how the library could be optimized both in 
> speed and in size
> if it would be compiled with the standard library and template.
> 
> Will Xerces always be compiled only for Standard C or I could 
> hope a step
> ahead?
> 
> - Sebastien

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to