Say "+[](){}" (http://stackoverflow.com/questions/18889028/a-positive-lambda-what-sorcery-is-this) doesn't look neither good, nor old C++, but maybe you get used to it... Do you feel any pressure to use new features of C++11? Is it popular among googlers?
We have a strict style guide, and are slowly phasing in some of the better features of C++11. We'll probably never use the full C++11 at Google, just as we don't use full C++ already.
To give some examples, we like 'auto', aliases, enum classes. We don't like lambdas, and I doubt we'll use them any time soon.
Just yesterday on an internal mailing list someone said that it's good we're bringing C++11 features in as it'll help new Googlers who come in from companies that use **all of C++**. In reply to that, people started joking about the mental health of those poor people, or how those companies must have all died out.
Well, if i think about it then they aren't that useful either, one can't pass around lambda functions, because captured variables will point to garbage, once the enclosing scope has vanished; on the other hand lambda functions are less verbose when passed as stl functors.
no subject
Date: 2013-10-10 02:56 pm (UTC)Do you feel any pressure to use new features of C++11? Is it popular among googlers?
no subject
Date: 2013-10-10 03:11 pm (UTC)To give some examples, we like 'auto', aliases, enum classes. We don't like lambdas, and I doubt we'll use them any time soon.
Just yesterday on an internal mailing list someone said that it's good we're bringing C++11 features in as it'll help new Googlers who come in from companies that use **all of C++**. In reply to that, people started joking about the mental health of those poor people, or how those companies must have all died out.
no subject
Date: 2013-10-11 02:57 am (UTC)Well, if i think about it then they aren't that useful either, one can't pass around lambda functions, because captured variables will point to garbage, once the enclosing scope has vanished; on the other hand lambda functions are less verbose when passed as stl functors.