patch against 2.9.0 and c++

Antonio Cavallo cavallo at biochem.ucl.ac.uk
Tue Aug 10 12:00:34 UTC 2004


Peter Ernst wrote:
> To my knowledge "string" is NOT a reserved word in C++.
> You run only into problems, when copying the std:: namespace onto the
>    A using directive makes names from a namespace available almost as if
>    they had been declared outside their namespace.
> 
A discussion about what is "standard" or "right" is not very helpful.
A lot of c++ code is using string as reserved keyword (without std:: 
prefix), so it is safe to assume that is good practice to restrict the 
usage of the word "string" (like false or true): in EMBOSS there are 
only few lines (out of many many present) to be changed.

"It is generally in poor taste", I will not argue about this point:
one of the nice c++ features (namespaces) are there to prevent the name 
space pollution, althout too many layers of naming are confusing (two is 
considered good, three start to be too much).

But let's face it. statements like:

std::vector<std::string>::iterator p;

are not exactly good taste either;)


regards,
antonio



More information about the emboss-dev mailing list