SAX/C++: C++-specific design principles

Paul Miller stele at fxtech.com
Mon Dec 6 21:07:43 GMT 1999


> - use C++ exceptions

I vote for C++ exceptions. That is why they are there.

> btw, i'd like to register an objection to reference args. they make
> code reading a bit of pain because you cannot tell from the call whether
> a copy constructor is going to be used or not -- you always have to
> go hunt up the .h. with a pointer arg, it is always clear.

If you always pass by reference, this isn't a problem. In C++, there is
almost never a compelling reason to pass objects by value. Always using
references is nice because you can tell by looking at the prototype
whether the argument is optional (if it's a pointer, it's optional). If
you always use pointers you have to read the documentation to find out.

--
Paul Miller - stele at fxtech.com

xml-dev: A list for W3C XML Developers. To post, mailto:xml-dev at ic.ac.uk
Archived as: http://www.lists.ic.ac.uk/hypermail/xml-dev/ and on CD-ROM/ISBN 981-02-3594-1
To unsubscribe, mailto:majordomo at ic.ac.uk the following message;
unsubscribe xml-dev
To subscribe to the digests, mailto:majordomo at ic.ac.uk the following message;
subscribe xml-dev-digest
List coordinator, Henry Rzepa (mailto:rzepa at ic.ac.uk)





More information about the Xml-dev mailing list