

C++ International Standard final draft is ready - wyclif
http://herbsutter.com/2011/03/25/we-have-fdis-trip-report-march-2011-c-standards-meeting/

======
d0m
Just anonymous function would make a huge difference. Presently, you have to
use boost or create new classes (Yes, you need to write a _class_ for _any
anonymous function_! (See _Effective Stl, item 46_ for more details of why it
is recommended)).

So, taken from: <http://www2.research.att.com/~bs/C++0xFAQ.html#lambda>

You could write something like:

    
    
      void f(vector<Record>& v)
      	{
      		vector<int> indices(v.size());
      		int count = 0;
      		fill(indices.begin(),indices.end(),[&count](){ return ++count; });
      
      		// sort indices in the order determined by the name field of the records:
      		std::sort(indices.begin(), indices.end(), [&](int a, int b) { return v[a].name<v[b].name; });
      		// ...
      	}

~~~
rwmj
Welcome to ... what? 1970? 1960? How many decades ago did other languages have
anonymous functions?

~~~
malkia
Exactly! Now it's time for the assembly language to get anonymous lambdas too
:)

~~~
rwmj
If only C++ was as useful as the odd bit of assembly programming.

------
sambeau
While most C++ users continued with the same tiny subset of the language they
have always used…

~~~
danieldk
Even if one uses a tiny subset of C++, the new standard provides many
improvements suited for nearly any subset. For instance:

\- Expected notation for angle brackets (vector<vector<string>> versus
vector<vector<string> >).

\- Type inference using the 'auto' keyword.

\- Initializer lists.

\- Range-based loops.

\- Strongly-typed enumerations.

\- Delegation in constructors (constructor-constructor calls).

\- Incorporation of TR1, which brings stuff like shared_ptr and containers
based on hashing (unordered_map/unordered_set).

~~~
cageface
_Type inference using the 'auto' keyword._

This is the one I'm looking forward to. Maybe I won't have to typedef every
stl container I use just to make my code readable.

~~~
rwmj
But compared to real type inference? In languages which have been around since
the early 80s??

Just being able to infer the type in the right side of an expression is
rubbish.

~~~
cageface
Of course, but I can't use any of those languages to implement commercial
audio units so I'm happy to have something in the one language in which I can.

~~~
rwmj
Really? You've actually (and verifiably) tried this or not?

~~~
cageface
Maybe you've never written audio unit or vst plugins? This is a domain in
which C++ virtual functions are considered too slow, not to mention things
like garbage collection. There's a reason everybody writes this stuff in C++
(and often assembly).

------
SamReidHughes
The important lesson here is that the only way to fix C++ is by making it even
more complicated. This may sound like a joke, but it is in fact the truth.

