LWN.net Logo

Re: Will therefore GDB utilize C++? Not.

Re: Will therefore GDB utilize C++? Not.

Posted Apr 15, 2012 14:20 UTC (Sun) by jzbiciak (✭ supporter ✭, #5246)
In reply to: Re: Will therefore GDB utilize C++? Not. by jwakely
Parent article: Re: Will therefore GDB utilize C++? Not.

Hopefully things will improve. But, for much of the C++ I write (on an embedded DSP, or on an embedded ARM using an outdated version of RVCT), C++11 will remain a fairy tale for some time. I don't expect to be able to write a lambda expression on either for another few years at a minimum.

But those clever hackers influenced the future direction of the language, making metaprogramming an integral part that _is_ intended to be used that way now, so C++11 provides variadic templates and extended SFINAE and cleans up a number of warts, all making the mechanisms more regular and more powerful.

It will remain true, though, that they had to fit within the existing C++ framework, and not break (too much) existing C++ code. If you were to design a powerful metaprogramming language to overlay onto a C++-like language from scratch, would it look like C++11? (Say, start with C++ of a few years ago, subtract whatever you like, and then add a proper metaprogramming environment of your own design.) There is some ugliness in C++ that can't be deprecated without breaking compatibility with C++ as it is.

Scott Myers' books are invaluable for understanding the best ways to use these features, IMHO. C++ definitely gives you more than enough rope to let you shoot yourself in the foot. In fact, it can take your whole leg off while you trip over it.


(Log in to post comments)

Re: Will therefore GDB utilize C++? Not.

Posted Apr 16, 2012 11:58 UTC (Mon) by jwakely (subscriber, #60262) [Link]

It might look like Vandevoorde's Metacode, but that stalled
http://www.vandevoorde.com/Daveed/News/Archives/000015.html

Copyright © 2013, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds