86 points · by pdknsk · 12y ago · 32 comments
http://blogs.msdn.com/b/vcblog/archive/2014/08/21/c-11-14-fe...
Last time I checked, outside most C++ compilers were still catching up with C++11.
There are more C++ compilers out there than just clang and gcc. Even those aren't 100% compliant at library level, if I am not mistaken.
Still quite a few rows with N.
https://gcc.gnu.org/onlinedocs/libstdc++/manual/status.html#...
I was only wrong about clang.
So my point still holds for gcc, and it doesn't change the fact, that there are more compilers out there than the triad clang, gcc, vc++.
Admittedly my knowledge is a couple years old, but the rule specified here of "you can only use them with explicit permission from the C++ style arbiters; maybe we'll reconsider later" seems consistent with that reasoning.
I'm glad I don't follow their rules anymore. rvalue references are incredibly useful in making ownership transfers explicit, and although they may sound confusing on first description, once you get the hang of it, they are easy to reason about.
And IMHO for move semantics, that benefit is pretty low. The overwhelming number of allocation bugs with C++ code are treated very well by RAII already. Move semantics tend to be best used in library code that implements some kind of dynamic runtime. And let's be honest: that's stuff that (1) tends to be done by experts already and (2) has been done successfully and robustly for decades in C anyway. Larry and Guido didn't need move semantics...
return static_cast<T&&>(value);
Library support for std::move is not the reason it's disallowed. (If it is, that's just silly and someone should create a discussion thread).Some of C and C++ advantages come from having 30 years of compiler optimizations, while compiler vendors stoped caring about implementations for other languages.
I am big on C++, but as a language geek, I am looking forward to .NET Native release, and see how far it can take C# in this language X vs language Y discussions.
All great languages, but try finding a D compiler for a Blackfin chip, or something similarly esoteric. C++ just goes more places where you would want it to go.
Some of C and C++ advantages come from having 30 years of compiler optimizations, while compiler vendors stoped caring about implementations for other languages.
Certainly - with a clean slate in 2014, you'd design something else - something that would make static analysis easier and static constraints possible. Basically, something like Rust. But C++11 is still pretty cool.
I am big on C++, but as a language geek, I am looking forward to .NET Native release, and see how far it can take C# in this language X vs language Y discussions.
I had no idea C# was 'going native'. I guess we've come full circle, what with this and news of Android L moving to ahead-of-time-compiled 'java'. Still, I have absolutely no interest in C#.
[1] Last year, I spent about a week doing maintenance on what you could call a legacy C++ application at customer site (I work as a sysadmin at a process engineering company). It was strangely fun (lucky for me, the application was quite well-written and I could easily find my way around the code).