[Live-devel] Which kind of code you would accept?

David Stegbauer david.stegbauer at acision.com
Wed Jul 28 02:33:44 PDT 2010


On Wednesday 28 July 2010 08:04:10 Ross Finlayson wrote:
> Specifically, looking at your suggestions:
> >  - C++ standard library string or custom string class (which one if any)
> >  - custom command line options parser class
> 
> No, ...
> because they don't fix bugs, nor do they improve (or even really
> change) the code's API

In fact use of std::string instead of char* is both change and improvement of 
API. User of library would not need to worry about delete []. On my platform 
(Linux gcc 4.3) sizeof(std::string) == sizeof(char*), so it has the same 
efficiency when passed as argument or returned by value. The worst I have seen 
was 16 bytes on 32 bit HP-UX in pre-standard mode.

> 
> (I'm also a bit wary about using some of the newer C++ features (such
> as templates), because some people's compilers might not support
> them. 

AFAIK templates and STL are supported Linux, Windows, MacOSX and Unix both 
using native C++ libraries and uclibc (uclibc++). I'm not sure about iphoneOS, 
qnx and alpha. Does anybody on list know?


> Ditto for 'standard' C++ libraries, which might also make
> applications too large for some embedded systems.

Standard C++ libraries could sometimes become huge, but there are techniques 
to keep final binaries small.
I've compared my custom string class against std::string. The resulting 
binaries differed by approx 100 bytes.

The most valuable thing on standard library is that it is extensively tested.

Best Regards
David Stegbauer

This e-mail and any attachment is for authorised use by the intended recipient(s) only. It may contain proprietary material, confidential information and/or be subject to legal privilege. It should not be copied, disclosed to, retained or used by, any other party. If you are not an intended recipient then please promptly delete this e-mail and any attachment and all copies and inform the sender. Thank you.




More information about the live-devel mailing list