I post this to tech-talk since I think it's of general interest.
Jeff Hill wrote:
> When this [abstractData.h, a replacement for GDD] was written I was
> receiving lots of advice _not_ to allow EPICS
> to become dependent on the standard library, but we will certainly
> find that we are off the path in the future if we don't support
> standard ways of dealing with strings.
I strongly agree. I even vote that the aitString type should be
abandoned completely. All these proprietary string types on the several
plattforms and C++ compilers give you a headache. Try to develop a
server tool on a windows system using MFC and you currently have to deal
with three string types: std:string, MFC's CString and aitString. Of all
these, std::string gives you the greatest flexibility, the most complete
interface *and* the most seamless fit to other, e.g. stream, libraries.
In my point of view it is nonsense to duplicate such a nice string type
with an inferior and non-standard version.
The funny thing about this is that everybody uses <stdio.h> and similar
standard libraries without any second thought, while on the other hand
there is stiff resistance against using the STL. This is like
programming your own printf() for fear of being dependent on the C
Also, as far as I know, the STL has been designed to avoid any kind of
overhead that is not absolutely necessary for the provided genericity,
i.e. performance is not an issue.
We should also use the STL container types, e.g. <vector>, wherever this
makes sense. A problem with STL is that there is no generic hashtable
provided. I'd say, that the hashtable that is part of the EPICS base
should be turned into a template container class that fits nicely into
the STL framework, thus making it easier to use and adapt.
The Notorious Neb Nesknarf
- Re: Let's use the STL! [Was: about the abstractData.h] Bob Dalesio
- Re: Let's use the STL! [Was: about the abstractData.h] Kay Kasemir
- Re: Let's use the STL! [Was: about the abstractData.h] Marty Kraimer
- Navigate by Date:
Re: Performance of portable CA server ? Bernhard Kuner
Tcl/tk Daniel BOGARD
- Navigate by Thread:
MPF and mpfSerial Marty Kraimer
Re: Let's use the STL! [Was: about the abstractData.h] Bob Dalesio