> Ram Sadasiv wrote:
> >
> > In addition to being "un-STL-like" and "un-PERL-like", when you get
into
> > the XMLPlatformUtils and the framework's insistence to returning memory
> > managed objects rather than pointers, it gets kind of "un-C++-like".
> >
>
> Right-on... I was surprised to see getChild return copies, instead of
> references. I would prefer references to pointers, BTW, they always
> point to an object that already exist.

DOM interfaces like getFirstChild(), etc., return copies of smart-pointers,
not copies of nodes.  And I don't understand your statement that references
to pointer "always point to an object that already exist[s]".  References
to pointers can be bound to "null" pointers, just like a pointer returned
by value can be "null".  Anyhow, the basic semantics of getFirstChild()
require it to return something that can be tested for "null", since there
may be no children.  In such cases, it seems pretty natural to me to return
a "null" pointer, rather than a reference to a "null" child.

> > But, as you point out, options are few... Also, given the number of
> > target operating systems/compilers
> > (http://xml.apache.org/xerces-c/build-other.html) the statement on the
> > home page:
> >
> > "For portability, care has been taken to make minimal use of templates,
> > no RTTI, no C++ namespaces and minimal use of #ifdefs"
> >
>
> Those features are standard in all compilers since a couple of years
> ago, at least; and templates, at least 4 years before that. Besides,
> nowadays, you can write pretty portable, #ifdef-free, code in C++; major
> compilers, like GNU c++ and VC++, compile the same code without a
> problem. Of course, I can't say the same about OS400 or other obscure
> OSs, but I guess g++ is also ported to them.

Not true.  If you start delving into the details, you'll find that many
compilers are still unable to deal with lots of code which is legal by the
standard.  Even worse, compilers differ in how they handle certain
constructs, so you end up with code that compiles on two different
platforms, but behaves differently.  Yes, things will get better, but many
platforms are still stuck in the relative dark ages, and not everyone can
use GCC.  And platforms like OS/400 are a lot less "obscure" that you think
they are.

Dave


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

Reply via email to