Kyon wrote: |
---|
Is this already built-in to the current version of GCC? If so, what libraries are in there? Are they enabled by default or do I need to flip on some compiler/linker setting? |
You have to enable it with the option "-std=c++0x". Look here:
http://gcc.gnu.org/projects/cxx0x.html
Luc Lieber wrote: |
---|
I'm not sure about GCC, but VS2010 comes stock with lambdas, smart pointers, the auto keyword, the decltype keyword, and Variadic Templates if I recall. |
Probably. I think that VS will implement the entire standard first. They have a lot of well financed dedicated manpower. Not that implementing the future standard is priority at that point, but people are eager to experiment.
On the other hand, I am afraid that C++0x will meet with the same destiny as C99. Limited adoption in toolchains for smaller markets. Also, the language starts to leave its Pascal-like (ALGOL-like) clarity and starts to become a bit like Perl. (I criticize only its readability.) In fact, I frequently come here
http://shootout.alioth.debian.org/ to look at various language sources. I mainly try to assess how much strain is necessary to comprehend the overall structure of a program in a given language. It is subjective, but Python seems to be my personal winner, but is so slow. C++ is not the worst, but is much messier than C. Functional languages vary. Actually, even Perl is very readable for some problems.
I mean, I understand that the use of punctuation helps emphasize some aspects of the code. For example, Scheme and Lisp have limited means for punctuation (primarily parenthesis), and you can loose yourself easily in larger bodies of code. Even with intelligent editor, you have to stay very focused (not on your thoughts). However, I feel that C++ starts to overdo it with the use of symbols and symbol sequences for special purposes. I think that the approach should have been more unified and stick closer to C to begin with. Instead of inheritance of structures, they should have introduced delegation of interfaces to sub-objects or something like that, which is still needed in the language. Also, all this implicit/default behavior is destructive. This is one of the few languages where almost anything you don't know will certainly kill you. It is good to have automatic option for something, but you should always request it. Now, partly because of backward compatibility to C, everything is so silently deadly.
Regards
EDIT: I mean, why didn't they allow the interoperability with C to be a linker problem (like the .NET approach) and create a clean language. It is moot point now. C++ is my personal favorite despite everything and that's why it hurts me to see how doomed its architecture and design essentially are.