Re: C++ 0x size and complexity
On 17 Feb., 16:14, Ioannis Vranos <ivra...@no.spam.freemail.gr> wrote:
C++0x being relatively close to ratification (2-3 years), what do you
think of its new core language facilities and the new standard library?
Personally, I do not care much for the size of the standard library, but
I am concerned about the new language features.
Deciding what to add to the (core) language and what not is
understandibly not easy. If you need to retain compatibility to C++03
it's even harder, I suppose. You would want to pick only the most
"important" features and try to solve other "issues" with libraries as
much as possible.
If I had to pick features of questionable benefit it would probably be
- uniform initialization
- alternate function syntax
The number of times I needed to initialize some container object with
a list of values is near zero and I fail to imagine many use cases. I
fear that this feature will just add to the initialization confusion
and that it will introduce new ambiguities w.r.t. overloaded
constructors programmers might not anticipate.
As for the alternate functon syntax I don't think that it's of great
use either. It will probably be rarely used in some non-template
contexts and/or used by those who don't like the concepts feature.
I'm not sure about the lambda proposal. In comparison to Boost.Lambda
the proposed lambda feature forces you to name the parameters' types.
But other than that it seems like it could make the "STL approach"
more popular (std::transform, ...).
The new features that I personally find most interesting are: rvalue
references and concepts. If you like to write fast and generic
library code they are of great use. No more cryptic template tricks
(SFINAE & other concepts emulation hacks). Rvalue references will
probably make pass-by-value more popular again which is a good. You
might want to utilize rvalue references if expression templates are
too complicated for you. Also, expression templates whose purpose it
is to *transparently* improve p=FCerformance don't seem to go well with
the new type inference feature "auto". I'm not an expert on
expression templates, though.
Cheers!
SG