When this question came up in a side conversation the Microsoft MVP summit, my initial reaction was that C++ is obviously the more mature language and that C# was a new language that was still "wet behind the ears." This conversation was with a person on the Microsoft C++ team, so the comment surprised me when they indicated that C# might actually be the more mature language.
While C++ is obviously older than C#, the C# language is no longer "wet behind the ears" or even new. It has been in the public for nearly a decade and it is a decade old if you consider its inception rather than its public announcement. While that is still not long in overall time, it is long enough for a language to mature. While C++ has a large number of years on C#, you have to consider that C# has lived in a time when languages are evolving quicker due to more community involvement and better communications.
Microsoft created the C# language and then released it as version 1.0 with a lot of features in place. With the ability to look at what had been done in C++ and Java, it was easier to create a product that started at a more refined level than many prior languages.
In version 2.0 C# was updated to fill in some remaining items that had been missing. By version 3.0, the language was relatively solid. With the addition of items like Generics in version 3, the language was really at a point where it was being extended beyond its original core. By that time the language was over the hump of having a solid core. Since that release, the language is continuing to evolve to contain additional features such as lambdas, extension methods, anonymous types, and expression trees.
C++ as a language is also mature. While I might not be able to say that C# is more mature than C++. I believe I am at a point where it is possible to say that C# is no less mature.
If you have thoughts on this, let us know! Do you consider C# more mature than C++?
This is certainly an interesting question to ask. I am afraid I do not have any direct comments to your question but would like to add a few related things.
I once had a complex task which required somewhat unusual constructs of code. While it took me sometime to do it with C++, it was downright impossible to do with C# (version 3) while still having readable code. Even though I consider myself an expert in C++, this is first time I realized that C++ is much well thought-over language as compared to C#.
On the other hand, C# makes it easier do to common tasks. But the situation goes out of hand with it if you need to do something unusual. The philosophy with C# seems to be more like filling in the missing pieces in the upcoming versions as opposed to having a well thought-over design from the very beginning. The missing pieces needed for unusual or less frequent coding constructs are not missed by people as often, so do not get added.
Having made such a high-level remark on the two languages, I still cannot say which is more mature. We need to define maturity better to have a clear answer to this question. To me, maturity is not related to just the past but also to the future. C# would still continue to get new versions faster than C++ would, and thus would "age" faster than C++. In this sense, C# is still developing and is not mature yet.
Ten years down the line, C# would be a hodgepodge while C++ may still be fine. Given that C# changes as fast as a software application would, the usual application life cycles may end up applying to C# as well. This argument of mine may be invalidated though by the new changes that are being brought into C++. (I think C++ committee finally felt the push!) I therefore do not know where C++ will end up being.
>> they indicated that C# might actually be the more mature language
And it seems you might be one of those C# fans or C++ haters who likes languages war.
So could you please give us those VC++ developers names.
P.S: You are comparing a language that has been used and is using to create most robust applications and systems even operating systems in all-over the world to C#. So what do you think?
Actually, it was was someone on the C++ team that made the comment regarding C# being more mature, so that negates the niave "C# fan or C++ hater" stance. In my opinion, it seemed like a crazy comment to say C# was more mature initially, but when you step back it becomes a little more interesting.
Don't consider the age of the language. Don't consider what the language has been used for. C++ is older. C++ has been (and is) used in a lot of ways. You can't argue with that. But being older doesn't make a person wiser, nor does being older and more used make a programming language more mature.
What makes a language mature is its ability to be used in a multitude of ways that meet the needs of its users. It is the ability to have adapted and grown to do what is needed. I thin, I believe that C# is maturing much, much faster than C++. I think that anyone would be hard pressed to say otherwise.
It is a question of is it more maturity though. It is about where in the life cycle the language is and how it has refined to meet needs. C# has come a long way and I think the answer as to which is more mature is not as easy to answer as most people might iniitially think.
Alok -
I believe that if C++ were controlled in the same way as C# then there would be more revisions. While C# is a 'standard', it is still controlled by a single company for the most part and within that company there is a primary leader -- Anders H. As such, the push for change is greater and the approval for such changes is "quick."
C++ differs in this. It is controlled by a committee of very smart guys who each have differing opinions. These opinions and other factors slow the process of introducing new versions to a near crawl. There are people like Bjarne S. that are considered leaders, but I don't see anyone on the C++ language committee that is driving things in the same way as Anders does C#. If there were, then the current C# standard would have been released a year or more ago.
I only mention this to say that the "frequency of revisions" is really a result of leadership on the languages more than on the language itself. (In my opinion at least ).
Hi Brad,
What you said makes sense.
Any software or a language is maintained well if various design choices gone into it are still valid as if the thing was "designed" for the needs of today/future. In practice, towards the later half of the life-cycle, the design choices are more a reflection of history rather than what they would have been if those choices were made today. I just wish that C# team realizes that and maintain it as a clean language for a long time.
C++, while I still respect it very much, has been slow to catch up even though the current times have asked for changes. At the end of the day, what drives any software or language bad is requirement for backward compatibility, which as you can see, result in making the design choices based entirely on history. I think this is happening and coming to C++ too.
Best regards - Alok
Brad,
>> I believe that if C++ were controlled in the same way as C# then there would be more revisions...
I agree with you.
And don't forget C++ TR1 published in 2005 but Microsoft implemented it in 2008 and C99 published in 1999 and Microsoft didn't bother to implement it till now. Also MS didn't implement Two Phase Name Lookup and exception specification yet that affects code portability even their codes. It is obvious that the new standard takes years to be fully implemented by Microsoft too.
The fact is regardless of how large the community of C++ developers is and how vast the C++ is being used, MS doesn't care about C++ and doesn't invest enough in it. Also C# is just a language and much of it's power is in it's libraries and .Net framework is really feature rich in many aspects. MS could invest more in C++ by creating a new GUI library that uses new and advanced features of language and could enhance it's database and enterprise libraries. They did a good job in WTL but didn't continue and let it die.
Also I think C++ is going toward to be more a scientific language. Instead C# and .Net is going toward to be more feature rich and easy to use that makes the life easier for developers. Actually I don't like C++ community decisions about Binary Standard, Modules and Signals and Slots proposals and I think C++ needs those soon plus a standard XML library, Database library, GUI barebones, more dynamic features and also more frequent releases and fixes to survive.
Sorry, I am just complaining.
>> MS doesn't care about C++ and doesn't invest enough in it.
I believe that Microsoft's attitude towards C++ has improved over the last two years. I don't see them pushing C++ to be a managed language like C# and VB.NET, but rather a langauge in it own right great for native development. This will help newer versions of C++.
>> Also C# is just a language and much of it's power is in it's libraries and .Net framework is really feature rich in many aspects.
I believe similar statements can be said about C++. Consider the STL and at MFC.
There is one major problem with C++ - the designers made it compatible with "C".
This meant that all the baggage and bad programming practices of C came over. It also inhibited the capabilities of C++.
A language cannot be divorced from the framework in which it is operating. Writing programs in C# under .NET in Windows is much more rewarding from a programming perspective than writing the same program under MFC. The quirks and historical inconsistencies of MFC have been largely eliminated.
But C++ is not going to go away for a long time, so we will just have to get used to writing both. C++ is more mature (older), but C# is an evolutionary development in my opinion.
I love C# as a language. When the first time I start learning the language, I was amazed on understanding the language has implemented the smarter things I learned in C++.
Penetration power of C++ is higher than C#. C++ is still perfect for low level programming.
I think C# is widely used to target .NET platform. C++ is being used for any platform.
As you have pointed out, C# has undergone more revisions than C++. This only factor cannot make it more mature. It's penetration power is low comparing C++.
It's Object oriented concept (C++, Java, C#) that is matured. Not C# language.
May be the time has come for a new language in with a brand new concept. (No more OOP). :-)
I continue to find that C# is much more limited than C++. I used to have a good impression of generics in C# ... until I used them! Now I find that the current level of implementation of generics in the language makes them "useless". Read here why: http://msdn.microsoft.com/en-us/library/c6cyy67b.aspx
I’d view the people of to ascertain that too!
We should live and learn, but by the time we've learned, it's too late to live.