views:

983

answers:

16

What is the lasting influence of C++ (not counting syntax) on the design of newer languages?

Edit: This question was originally titled "Is C++ dead? Has it stopped influencing the design of newer languages?" but got closed. However, some of the answers respond to the original title.

+14  A: 

I use C++ at work. So, no, not dead at all. :)

Dima
+3  A: 

C++ is not dead. There is a lot of C++ code out there and it will be used in legacy and even new products for a long time.

C++ is now several language generations old. The newer languages that were influenced by C++ are now influencing the newest languages. In the newest languages you can still even see the influences of C.

FigBug
+6  A: 

I don't think so. Look at the two most popular languages on this site; C# and Java. They're both STRONGLY influenced by C++, such that they share a large amount of syntax. While you talk about "newer languages", the simple fact is, nothing has come close to the level of acceptance and penetration that Java and C# have (sorry, Ruby fanatics). Arguably, you could use this as an argument that C++ is more influential than ever; its' progeny continue to dominate.

McWafflestix
+11  A: 

No, C++ the language isn't dead. It's as useful as it ever was, and quite widely used. But, the hype surrounding the language has moved on to Java, Ruby, etc. C++ isn't getting as much press as it once did - and frankly, I consider that to be a good thing.

Sherm Pendley
+4  A: 

Obviously a language which was once as dominant as C++ will never be dead if only because there will for a long time still be a lot of C++ code out there that needs to be maintained.

As for the influence of C++'s syntax on newer languages such as Java and C#, this syntax was chosen (in the case of Java, at least) to make the language easier to learn for C++ developers, rather than out of some belief that the C++ syntax is particularly beautiful, powerful, etc.

Don
+10  A: 

There are two questions here.

  1. C++ is not dead, it's still widely used throughout the industry. It's not the number 1 language anymore, but I doubt it ever has been.

  2. Will it continue to influence? Well, fancy new languages (Java, C#) had all the time they want to borrow all they could from the current form of C++ now. They still fall short of implementing an equivalent of the C++ templates (instead of the so-called "generics"), but it's the choice of their designers and I understand that.

We'll see what will happen with the new ideas which will be implemented in C++ 09. It was a necessary to do an upgrade (and to borrow some good ideas from new languages too!) because most programmers expect now some things like delegating constructors and real null pointer, to cite a few.

ckarmann
+3  A: 

It depends on what exactly you mean by "dead". Many people consider Fortran "dead", but its standard is still being updated, and I know of numerous places where brand new Fortran code is being written today.

However, by nearly any definition, C++ is not even hurting yet. For instance, the reports I hear from this year's OOPSLA were that C++ was better represented there than any other language save Java. Since this conference is all about CS research, I don't see how anyone could possibly argue that C++ is no longer influencing reasearch. This is from someone who really wishes it were dead, too.

T.E.D.
A: 

The Parasol group in the CS dept. at Texas A&M University is doing tons of active research on core C++ issues. Far from dead.

Ben Collins
A: 

Both Java and C# refrained from borrowing from C++ anything that they could do without. For example, in terms of object model, they decided to move far away from C++. That languages newer than Java have chosen not to revert back to the C++ model, I would say that C++ would never further influence newer languages. What is being passed on is a philosophy which is counter C++.

The borrowing of syntax was a necessary evil and possibly largely regretted in hindsight.

Aydya
I don't think borrowing the syntax (which is indeed pretty awful) was necessary. C++ had to do it because it was meant to be C-compatible. Java never had to maintain C compatibility in the first place, so the only benefit they got from the C syntax is familiarity.
jalf
Familiarity WAS the big benefit!
Aydya
Yeah, but was it so essential that Java couldn't have taken off without it? Bjarne Stroustrup once said that this was his biggest gripe with Java. ("I had to use C syntax for compatibility. What was Java's excuse?"). Perhaps they really needed that familiarity, but Java had been nicer without it.
jalf
+2  A: 

Nope. Not at all. That's like saying COBOL is dead. It's still there.

Have a look at how much COBOL coding is still out there. A language isn't truly dead until the large majority no longer develops in it. This isn't to say it won't continue on living in niche markets even long after that point as well.

Kind of like the inverse to "Is D the language of the future?" in which case you'd say, "Well, it could be.", that of course depends on the developer community and how many get in there and support that language for whatever reasons.

Mat Nadrofsky
A: 

A lot of the responses so far address the question "Is C++ dead?", but don't address "Has it stopped influencing the design of newer languages?"

Taken as two independent questions, no, C++ is (unfortunately) not dead. But in dealing with the second -- "Has it stopped influencing the design of newer languages?" -- I think the answer is yes.

C++ directly influenced Java, which originally influenced C# (of course, I'd say C# is now influencing Java, but I digress). But as far as new languages go, I think very few -- with the exception of perhaps D -- are really influenced by C++. After taking a look at the C++0x specs, it's clear that C++ is mostly trying to play catch-up to other languages. Most of the features being considered for C++0x are already present in other languages -- including a lot of so-called "mainstream" languages.

C++ will always have a legacy due to the large amount of code written in C++, so in that sense it's far from dead; but it's certainly not going to influence new languages any time soon.

mipadi
+4  A: 

Dead? Not at all. I do think it has more or less stopped influencing other languages, which, in some respects, is a shame. Java and C#, for example, are pretty much based on a very early idea of what C++ was (closer to what you might call "C with classes").

What we call C++ today, the mix of generic, OO and functional programming, sprinkled with metaprogramming seems to have passed these languages by, unfortunately. (C# is adding features inspired by functional languages, which is nice, but the other parts of C++ are pretty much ignored) That's a shame, because while there's a lot in C++ that any sane programmer would want to stay far, far away from, it has also evolved some very clever techniques and idioms which other languages could benefit from. (Say, proper RAII in C#/Java, or a STL-like library with all the genericity and extensibility that entails) There are even aspects of OOP in C++ that are better thought out and, well, more object-oriented, than their canonical Java/C# counterparts (preferring nonmenber functions to increase encapsulation, for example)

In a way, I consider C++ a sibling to Java/C#, rather than a parent. All three are derived from the very early ideas of C++, which, as any C++ programmer should know, is essentially a different language from what we call C++ today. And unfortunately, when Java and C# were designed, they didn't really look to their big brother, "modern C++" for ideas, but only to the parent "C with classes".

But the language itself is far from dead. It is still evolving, and it is still widely used.

jalf
What features in C++ exhibit "functional programming"?
mipadi
The STL and functors in particular, or template metaprogramming, and boost.Lambda come to mind as examples. Yes, it's more in the form of idioms that people use than in actual language support, but it's still an aspect of functional programming that by far predates C# more recent embrace of FP.
jalf
A: 

C++ is not dead. I would call it moribund or on life support. Everybody knows it's outdated, brittle and crufty and should be confined to legacy stuff, but there is no mature replacement for it that handles most or all of its use cases. Java and C# are partial replacements, and for the use cases they handle well, people have deserted C++ in droves.

The closest thing I've seen to a successor to C++ is the D programming language. The core language is heavily but not exclusively influenced by C++,and pretty impressive, though it has a few rough edges as a symptom of its immaturity. However, D has a long way to go in terms of infrastructure, such as IDEs, libraries, books, courses, and all those other irritating things that are important in the real world but aren't part of the language itself.

dsimcha
A: 

Nope.. not dead at all. Infact it will soon be coming out with a new and additional set of standards (http://gcc.gnu.org/projects/cxx0x.html)

Sridhar Iyer
A: 

Assembly (lowlevel, allmost machinecode) can't possibly die, C and C++ ("semi-lowlevel) probably won't either. There will allways be a need for a language wich allow you to do anything the processor can do. For operating systems, device drivers and probably computer games and anything that require very high performance and direct hardware control you cant live entirely without a lowlevel control. (I don't beleave anyone would really bother to design a new language with as much low level control as C, C++ etc. to replace it)

Stein G. Strindhaug
+2  A: 

Are you an artist, or a drone?

Do we need yet another scripting based shopping cart, during the credit crunch? Do I want another crappy corpo-site full "interactive" marketing thanks to RoR???

C++ is to scripting, as Latin is 2 texting. It may be dead, but it enforces deep understanding of computing power and principles, which equip the subsequent scripting author with a depth of understanding of computing principles which will liberate her capabilities.

Please don't give us more braindead wordpress soliloquys. Please don't give me more dumbed down aggregator sites. Ease of output has created a glut of website turkeys.

Please do push technology to its current limits, and use your imagination to harness every possible last Mhz to push out some magic.

Tom Browne.