News for hackers. Stuff that matters.
Re:The Biggest Changes in C++11 (and Why You Should Care) by stinos on Wednesday November 07, 2012 @08:37AM (#4753311)
"C++11 still lacks a few useful libraries such as an XML API, sockets, GUI, reflection"

that's a bit of a strange statement, no? Since when is a GUI or even an XML API part of the core language features? And adding reflection would, erm, kinda mean that every compiler has to be rewritten almost from scratch.

Re:The Biggest Changes in C++11 (and Why You Should Care) by qznc on Wednesday November 07, 2012 @09:29AM (#4753471)
C++ already needs runtime type information [0] for certain features (dynamic_cast, typeid). So the basic compiler infrastructure is already there. No need to "rewrite from scratch". Just add more information into the RTTI data structures and provide the mechanisms to inspect (optionally modify) classes.

[0] http://en.wikipedia.org/wiki/Run-time_type_information

Re:The Biggest Changes in C++11 (and Why You Should Care) by stinos on Wednesday November 07, 2012 @09:52AM (#4753552)
good point actually, didn't think that through. Still full reflection like in C# for instance seems quite a long way from RTTI.
Re:The Biggest Changes in C++11 (and Why You Should Care) by stingraycharles on Wednesday November 07, 2012 @08:46AM (#4753333)
There's rumour about C++14/C++17 supporting reflection:

http://root.cern.ch/drupal/content/c14

Re:The Biggest Changes in C++11 (and Why You Should Care) by vilya on Wednesday November 07, 2012 @08:46AM (#4753340)
The c++ standard library is pretty sparse if you compare it to python's or java's, say. Good point about reflection; personally I don't miss it though. Where I would have used it in java, for example, I often find I can get a better result using templates - it just takes a bit more thought.
Re:The Biggest Changes in C++11 (and Why You Should Care) by nimrody on Wednesday November 07, 2012 @10:19AM (#4753640)
Too bad "Concepts" did not make it into the standard. Would help avoid the tons of unintelligible error messages one gets when using template functions incorrectly.

Given that C++ libraries are getting so complex (now with move semantics!) there is no way a library user can understand why something does not work as expected. Especially when dealing with sophisticated libraries: Boost, Eigen, etc.

Re:The Biggest Changes in C++11 (and Why You Should Care) by stingraycharles on Wednesday November 07, 2012 @11:42AM (#4753990)
> Too bad "Concepts" did not make it into the standard. Would help avoid the tons of unintelligible error messages one gets when using template functions incorrectly.

As far as I understood it, this was merely due to discussions what types of Concepts would be supported. There was one group of people that wanted very granular Concepts, and another group of people that wanted just very broadly defined Concepts. They never reached an agreement on this.

Re:The Biggest Changes in C++11 (and Why You Should Care) by Negitivefrags on Wednesday November 07, 2012 @03:17PM (#4754984)
We didn't get concepts, but I think that in the long term it is a good thing. Instead of that we will probably get a more D like static if which basically does everything concepts did but it much easier to implement and understand.
Re:The Biggest Changes in C++11 (and Why You Should Care) by nicholassmith on Wednesday November 07, 2012 @07:33AM (#4753159)
I'm really looking forward to when the standard is implemented across most compilers. There's some great new features that I hope goes some way to addressing some of the complaints levied at C++ (there's still plenty left to go).
Re:The Biggest Changes in C++11 (and Why You Should Care) by stephen_g on Wednesday November 07, 2012 @08:16AM (#4753255)
The support is actually pretty good - since the standard went through such a long process, most compilers had support for at least some of the features as long as a couple of years ago (back around the TR1 draft).

I already use it for some little new projects. I'm sure a lot of legacy stuff won't be able to move on to the new standard for a while because they need backwards compatibility with old compilers though.

Re:The Biggest Changes in C++11 (and Why You Should Care) by nicholassmith on Wednesday November 07, 2012 @09:08AM (#4753401)
No doubt it's getting there, but with a couple of the big ones (MSVC especially) missing chunks it's hard to shift over completely. I've used it a few times with GCC and I've been pretty much happy with all the new features, looking forward to using it a bit more often.
Re:The Biggest Changes in C++11 (and Why You Should Care) by whazzmaster on Wednesday November 07, 2012 @12:58PM (#4754381)
VS2010 implemented much of the C++11 feature set, and VS2012 implements almost all of it. See http://msdn.microsoft.com/en-us/library/vstudio/hh567368.asp... for a table comparison of C++11 support.

I'm itching to start using this stuff in QuickBooks; I love smart pointers but hate auto_ptr and being able to safely use STL containers with smart pointers opens a new world of entity processing.

Re:The Biggest Changes in C++11 (and Why You Should Care) by snogglethorpe on Friday November 09, 2012 @05:35PM (#4765041)
Unfortunately there's still lots of stuff missing, e.g. delegated constructors and, probably most significantly, constexpr.

The apache table[+] has been updated as of this month, and MSVC (with a version given as "11.0 nov'12") now is looking rather better, but is still missing constexpr... :(

Still, it appears that there should be fairly good support in all major compilers within the next few years, at least if you can depend on your devs using relatively up-to-date compiler releases (not at all a given where I work!)... :]

[+] http://wiki.apache.org/stdcxx/C%2B%2B0xCompilerSupport

Re:The Biggest Changes in C++11 (and Why You Should Care) by nicholassmith on Wednesday November 07, 2012 @03:01PM (#4754911)
Ah awesome, last time I looked there was a few things missing that looked a bit of an oversight. I was trying to remember when exactly but it must have been a while ago.
Re:The Biggest Changes in C++11 (and Why You Should Care) by fafner on Wednesday November 07, 2012 @08:48AM (#4753345)