C ++ in the modern world
Discussions about the current situation of C ++ in the programming world, as a rule, divide the participants into two fronts: some do not like this language, predicting an early death for it; others, on the contrary, claim that they wrote, write and will write in C ++. I would say that the truth is somewhere in between, but that would mean that C ++ is in some kind of “suspended” state in which it was, for example, between the outputs of the C ++ 03 and C ++ 11 standards. In fact, things are a little different. How? Let's try to figure it out.
Let's go to the bottom?
Nothing like this. Maybe C ++ is not so popular in terms of learning by novice programmers, like C # or Java, maybe new technologies released by giant corporations are not honed under it, maybe it is not promoted by the same Microsoft and Oracle, but to say that C ++ went to the bottom - means impudently to lie. Software written using C ++ has not gone away and needs support. New software, for example, game engines, also uses C ++ with might and main, and the standards C ++ 11, C ++ 14 and the upcoming C ++ 17 only confirm that things are going well with this programming language. But let's talk about everything in order.
C ++ 11, C ++ 14, C ++ 17 ...
As mentioned earlier, between the C ++ 11 and C ++ 03 standards, the language was in a kind of “suspended” state. It seems that libraries such as boost, Qt and others developed and supplemented, C ++ / CLI appeared, and there was not and never was a new official standard.
This went on long enough, and the C ++ 11 standardPlanned for publication in 2009, it was released only two years later. But nonetheless came out. And not just left, but brought a lot of additions, extensions and "syntactic sugar." Writing using the new standard has become easier and more convenient, many tools have been added to the standard library that make life easier for programmers. Official support for parallel programming was introduced, which is important, initialization lists, designed to make the code more understandable, lambda functions that probably found their fans ... And this, of course, is not all, but the article is a little different - it makes no sense to list all the innovations here.
Great, the C ++ 11 standard came out, and then what? Again simple for 8 years? But no. It's not news for anyone that the C ++ 14 standard has already been released. No, there is no question of such an extension that C ++ 11 brought in, but additions and improvements are taking place.
But just as importantly, the trend has not been lost, and preparations for the new standard, C ++ 17, are already visible on the horizon.
Undoubtedly, some time will pass before the programmers learn all the charms of the new standards and learn how to correctly apply the innovations. However, these innovations should have a positive effect on the quality of code and software.
What about old software?
A lot of software has been written using C ++. And, of course, it needs to be supported. Want to take a look at real life examples? Please relevant listto help. Surely you will find many familiar products there. I don’t think that someone will rush to rewrite existing working C ++ code in C # or Java, only because it will be more convenient in the future, because “garbage collectors”, etc. etc. It turns out that knowledge of C ++ is again necessary. And taking into account the fact that C ++ has become much more convenient in working with the release of new standards, the idea of writing modules / additions in modern C ++ has a place to be and does not look crazy. In the future, such code will be much easier to maintain. At the same time, it is still the same productive C ++, with an extensive set of features. And the supplemented standard library will allow using ready-made solutions without the need for the invention of bicycles.
Popularity among beginners
Things are not going too smoothly on this front: C ++ is not a very popular language among beginner programmers and loses much to languages like C # or Java. Why? There are several reasons:
High entry threshold
Probably there is no such programmer who would not hear about the complexity of C ++. Of course, the language is vast, there are countless nuances. But what do we get in return? Performance + in-depth monitoring of ongoing processes (especially if you go down a bit from C ++ to pure C). Here again, we should mention the C ++ 11 standard, which is more friendly to beginners, offering convenient syntax, various containers, algorithms and other convenient things designed to make life easier and writing code.
Nevertheless, although the likelihood of this is very reduced, you can still shoot yourself in the foot if you wish.
I think it’s no secret to anyone how languages such as C # or Java are being promoted by the owner corporations: Microsoft and Oracle. I will not for sure talk about Java, as I am not too familiar with trends on this front, but Microsoft’s progress is quite noticeable. Most Microsoft technologies are sharpened specifically under C #. Hackathons hosted by Microsoft, again pass using C #. No, this is not bad, just a statement of fact.
There is no such support for C ++. Yes, various tools are released for him to facilitate the work and the process of creating applications. Here it is worth recalling the same Qt , recently released ReSharper C ++ from JetBrains. In Visual Studio 2015Introduced support for some innovations from the latest standards, plus some additional features - it became more convenient to work.
But with the scale of the aforementioned advancements, this nevertheless does not go into comparison.
Despite the fact that C ++ is a language that gives the developer, as they say, all the cards in hand, the scope of its application is not comprehensive and occupies a certain niche. There are competitors, this also has its effect. Take, for example, mobile development. The main platforms are occupied with various languages: Windows Phone - C #, Android - Java, iOS - Objective-C. And this does not mean at all that there is no way to write C ++ for these platforms, the only question is how convenient it will be and whether it will also be effective. For the web, development for which is becoming more and more popular every year, C ++ is also not very suitable. The ability to work with sockets is, libraries, like Wt, are. But have you heard a lot about web applications running in C ++? Here I am. Given that mobile and web development have become very popular and are only gaining momentum,
Words are words, but as they say, it is better to see 1 time than to hear 100 times.
So I suggest a look at the current state of affairs. Quite popular in this regard is the TIOBE index , which reflects the ratings of the language, its change in the rating table and other indicators.
As you can see, in comparison with last year, C ++ not only did not lose ground, but was also able to enter the top three. Moreover, it is one of the two languages in the top five, whose rating, albeit slightly, but nonetheless rose.
I think that you have already formed an opinion about the current situation of C ++ in the modern world. Let me express my own.
It is impossible to shout that C ++ is more alive than all living things, as this would be a lie. It is also impossible to say that C ++ is dying, since this is still a big lie.
C ++ is alive and occupies its own specific niche. Outgoing standards add innovation to the language, making it more convenient and easier to use. Software written in this language has also not gone away and needs support. In certain areas, C ++ is the best suited for writing software, and this, together with the above, means one thing - C ++ is relevant, it does not intend to develop and lose ground.
If you want to share this article with an English-speaking audience, then please use the link to the translation: Sergey Vasiliev. C ++ in the modern world .