Yikes, I am glad you  pointed this out. I had made the
assumption DOMString had value semantics not pointer
semantics. I have some code to go check.

        -joe

[email protected] wrote:
> 
> This is a result of how DOMString was implemented.  Think of it more like
--snip--
> The meta issue here is that I think this is a very confusing implementation
> for C++ programmers -- most would think that a DOMString is more like the
> typical C++ string class (std::string, for example), rather than a Java
> StringBuffer.  I predict this will be a frequent source of
> very-hard-to-find bugs.  Imagine geting a value from a node and
> inadvertantly modifying that string:
> 
>     DOMString  theNodeName = node.getNodeName();
> 
>     theNodeName += "foo";
> 
> I've now changed the name of the node.
> 
> Dave
>

Reply via email to