Re: [Plib-devel] C++ Philosophy Question
Brought to you by:
sjbaker
From: <Va...@t-...> - 2000-03-20 17:23:55
|
Bill Weiland wrote: > > Hi all: > > Not to start any religious debates here, but are there any guiding principles in use of C++ language/library features for developers on plib? I'd like to make use of STL and standard string-s, for example, but it has not appeared in the existing codebase (that I've seen), and I wanted to make sure that I'm not creating problems for other users (depending on what version of what compiler one uses, this might not fly). A few other constructs I haven't seen used (much?) are templates, references, operator overloading - do people feel these are trouble-prone? STL can be done in a way that works. But you have to be careful about the namespace. MSVC only lets you write e.g. std::cerr (except you are using the 'using' operator). But most of that can be handled with one compatibility file. IMHO it'd be great for PLIB to have one (so that e.g. FGFS or PPE doesn't need one itself). As soon as we've got one there wouldn't be any (compatibility) factor limiting our STL use. I know that Steve doesn't like operator overloading much => it isn't used in PLIB (afaik). I don't know how restrictive he's about it now as PLIB is public... (youst to be prepared when you ask him: get enough fire extinguishers...) References are also not too welcome to Steve (afaik). But I think that he accepts const references to save copying. I think that templates might not be very portable - but any compiler that supports STL should support templates... So I dunno why it's not used. CU, Christian |