The Future of C++ As Seen By Its Creator
holden writes "In a rare public talk, C++ creator Dr. Bjarne Stroustrup discusses his ideal in programming languages, as well how he sees the next version (and beyond) of C++ developing. He explains the general selection criteria used for adding new features, some of the legacy of C++, and many other interesting topics. Especially interesting is during the Q&A he explains his views of the embrace and extend mentality some implementations, such as VC++, have taken."
...transcript, anyone? i hate watching or listening to vids at work.
Video or audio just for the sake of being flashy is a dumb idea and I usually won't watch or listen. If I want audio and video I'll devote my full attention to my TV feed. Otherwise when I'm accessing information on the Internet I want text. I can read it far faster than someone speaks on a video interview for one thing, and for another text lends itself far better to (human)multitasking than video or audio does.
Is that they have given 95% of the development time toward managed languages.
.NET has advanced from 2.0 to 3.5 with huge changes like WPF, WCF, LINQ, etc. They have all but forgotten C++.
If you look at the new Visual Studio 2008 - in the three years since 2005 was released, what does Orcas have for C/C++? Still no C99, with open admission that there are no plans to support it. No TR1 for C++. No significant compiler changes. Intellisense is still slow and quite easily stops working all together. Still no assembly support in the 64-bit compiler, missing intrinsic functions for important instructions such as CMPXCHG16B.
What we get is a newer bundled Windows SDK (which you can download NOW), updated MFC libraries (yuck), and a few new options for Vista compatibility.
In three years,
That's a weird article.
Why is this candidate "bad" because he interprets a piece of marketing twaddle (i.e. the name of C#) in a different way from Bill?
Round here we (mostly) purposefully call things the wrong name, usually as an exclusive in-joke because we all really know what the real term is meant to be. This includes Giga- pronounced "jigga-" and internet called "interweb" or "interwebnets". My favourite is referring to C# as "coctothorpe" as the proper name for the # symbol is octothorpe. I also used to call C++ "C double plus" as "plus plus" just sounds so ugly (and I'd just finished reading 1984 when I started programming).
This candidate may be useless for other reasons (and it looks like he is), but calling a silly programming language with a silly name something silly shouldn't be held against him.
to Stroustrup, but don't you think it's a bit ironic that the creator of such a monstrosity is talking about ideal of programming languages? And don't even get me into the the differences between implementations!
Yeah, go ahead, bring out your flame hose. Even if I had to burn in hell, this thing is still a monstrosity.
A lot of C++ developers are fans of header-only libraries. What can I say, I am too - it makes use of these libraries so much easier. Having assembly files breaks this when writing a library.
I agree that a good developer will almost never need to use assembly. Unfortunately there are some (very few, but still some) things you just can't do efficiently in C++ - be it a limitation of the language or the compiler.
Believe me, I wish Microsoft could implement intrinsic functions for everything I need (like CMPXCHG16B mentioned previously). But they don't. I want nothing more than to not have to touch assembly!
C++ is anti-C (should have been named ~C):
can't tell what's going to happen just by looking at code
(you have to look way behind the scenes
Website Hosting
Again, I'm not an expert in this area, but it seems to me that Dr. Stroustrup tends to define his leadership narrowly and concern himself with programming constructs rather than larger issues such as extension, standardization, and certification of libraries, for example. About C++ garbage collection he says, partly: "See ... Hans-J. Boehm's site [att.com]". It seems to me that there are too many areas in which the C++ answer is "You can just go there", rather than "This is the standard, certified method."
You left out his quip about how C# and Java leave twice as many resources open at run time and something about sloppy programing. A run time GC is not something I believe is needed in C++. If you want that, write it in Java and live with the associated bloat. Or pull in someones library that does the same thing. An example: http://www.hpl.hp.com/personal/Hans_Boehm/gc/
What all programmers can't seem to get through their heads is that it takes years to become "proficient" at any language. Once proficient you then understand why things were done the way they were done. Most critics of C++ wish they had learned it or perhaps spent 1 month with it and thought they were experts at critique.
What mystifies me is the masses often get sucked into propriety closed languages/tools like VB, NET, C# (C-Pound) and others. Trouble is, by the time they actually get proficient the vendor will change the API. To a lesser extent this applies to Perl, Ruby, PHP etc also. And off you are wasting time on relearn tools. Which is why I decided early on to learn C right down to the bootstrap code early on. And later learned C++. Not an easy road, but I spend now spend far less time learning tools and much more time punching performance code.
Call me nuts if you will, but I like C/C++. And suspect, like Dr. Stroustrup does, they have been predicting the 2 year demise in C++ for 12 years and it is still with us. Sun likes Java because it sells big servers to run that bloat ware. Who is kidding who?
The problem is that there are so many ways to do things wrong in C++. Writing proper code takes experience. It doesn't help either that monsters like MFC easily mess things up.
I was going to quit coding C++ when I discovered Boost and wxWidgets. Now I don't want use anything else.
Adventure, Romance, MAD SCIENCE!
You are right in a way. Most people do not need pointer arithmetic, but it becomes very useful when you are working with external blocks of data. For example, I was writing some audio capture code in Java and with it you are passed byte arrays. In Java, you cannot simply treat this as a block of data because it is an object. It makes doing things like 16+ bit audio quite annoying. With pointer semantics I can simply treat the byte array like a short array and be done with it. There are many applications that deal with such external blocks of data that also need high performance, which requires the use of memory pointers. To completely replace C/C++, a language must allow this kind of direct memory manipulation.
C++ is my main development language right now, but I have to say: please give it a rest. C++ is what it is, and I don't think adding even more crap to it is going to make it any better.
What we need is a language with C++-like performance characteristics and a C-like syntax that will feel familiar to C/C++ programmers but without all the baggage of 30+ years of C history.
(And, no, neither Java nor C# are that language.)
Could it really have been that difficult to add a "null" keyword to C++? "bool" was cleanly added to C99. We could have had "null" too. I accept the argument that (void*)() isn't typesafe but then the language expects you to throw around a literal integer "0" that is imbued with magical properties. How is this a cleaner solution? This magic 0 violates the type safety principal that got us into this rathole to begin with since it can be assigned to non-integral types (pointers). It can also transform itself into another value since the null address isn't necessarily 0 on all platforms.
I am becoming gerund, destroyer of verbs.
I don't think Stroustrup is in denial at all. Read his book The Design and Evolution of C++ for insight into his decision making process. You may not always agree with it, but at least he's thought things through. When developers start launching complaints about missing features from C++, they generally miss the point of why C++ exists in the first place. It's not a be-all-things-to-all-programmers language. It's a tool to help you get many different types of jobs done.
No thread management : this is an OS-specific issue. Yes, almost all modern operating systems use threads, but C++ isn't designed to do OS tasks. It's a tool so that you can design your own management of threads in a way that suits your projects and style. Use Boost if you want a widely-supported, cross-platform set of thread management classes.
No memory management : again, OS-specific. What if I don't want garbage collection? I like the fact that C++ has deterministic destruction of objects, and I can use that to my advantage. If you want memory management, use boost::shared_ptr and it's siblings. Yes, auto_ptr is broken for various activities, but if you aren't aware of the freely available and widely supported alternatives that work just fine, then you need to update your C++ skill set. Stating that templates are a bolt-on solution for memory management is way off base and shows that you don't really understand that templates are a generic programming construct. And to state that we have buffer overruns in C++ because of bad language features is, again, attempting to assign the problem to the wrong source. If developers would use smart pointers and other safe development tactics, a lot of the problems would go away. Hell, I work with a guy now that refuses to use 'const' in parameters because it involves typing 6 extra characters. It's attitudes like this that cause runtime issues, not the choice of language.
C++ is still a great language. If programmers would take time to familiarize themselves with quick and easy ways to start tightening up their code, we wouldn't have so much problematic software. Instead, everyone sits around and looks at Java, C# and their ilk and demand that the same do-everything-for-me features be brought over. That's not the spirit of C++, and frankly I don't want to see C++ messed with that way. When I want those features, I use those tools and understand why both exist.
IMHO, I think: .NET languages. You can't have the ability to do whatever you want to a variable, and the ability to be safe from it simultaneously.
a) If you want garbage collection, you have to leave C++ and go to a truly safe language like Java or one of the
b) If you are trying to code a GUI application with cool RAD development tools (like VisualBasic and Eclipse), then C++ is the wrong language. It was never built to be quick and easy for the programmer. Additionally, the windows based object-oriented metaphor makes proper memory management difficult.
c) If you try to use all of C++ in one program, you deserve to be shot. C++ should be used with strict coding guidelines on what features will be used, and what features won't be used. These features can be picked on a per application basis, and thus the language can be customized for almost anything. Just don't try to do everything simultaneously.
What C++ excels at are projects that require complete control of the machine. If you need the asm directive, its there. If you need funky type unions, you have them. If you need to organize your code, so people can understand it, you have objects and namespaces. If you need to customize the behavior of new(), you can do it. If you need C language compatibility with your header files, it can be done. C++ gives you every option that you may need. Just don't use all of them simultaneously.
Most of the standards effort is going into template features that few will use and fewer still will use well. Trying to use the template expansion engine as a general purpose macro system is a terrible idea for production code. But it has a big fan club on the standards committee. Worse, the C++ commitee does very little to improve language safety and reliability. Which is why we still have buffer overflows in C++ code, fifteen years in.
Obviously, you never used modern C++ extensively.
Templates are not a macro system, they are a typesafe meta-language. I agree that their syntax sucks, but they are lightyears away from being a simple macro system. And lots of people use them, just look at the STL string or vector. You think few people will use concepts or variadic templates, think again. Generic programming is the actual edge of C++.
I really suggest you read "Modern C++ Design". There you can see perfectly valid examples of how to use templates. Policy-based is a good and powerful example. With this, I can customize my code at compile-time, for example, having a policy which locks a mutex in proper code sections, and another policy with no locks at all. This way, my code *can* be threadsafe, but does not *have* to be (thread safety is useless in a singlethreaded program). Oh yes, I could do that with the preprocessor too, but try debugging this. Also, say goodbye to namespaces, type safety and debugging support.
Safety and reliability have nothing to do with C++ itself. Many people overuse new and delete, without relying on proper RAII constructs, for example. If you think MFC-style C++ is the zenith, you don't know C++. I have been programming C++ for over 7 years and reached a point where memleaks happen extremely rarely (mostly due to rushed code). Its no black arts, no voodoo, just proper C++ usage.
This sig does not contain any SCO code.
Two mediocre programmers chiming in does not a bad language make. I'm sorry but someone who's worked with a language for 20 years and still hasn't learned it, well, you guys should stick with VB or Java or whatever the new COBOL is these days. Languages for non-technical people such as yourselves.