📜 ⬆️ ⬇️

Mmm ... Super language ... Give me C ++ please!


I decided to support the article “ The myth of super language ” and draw attention to two important points that usually fall out of sight when discussing programming languages.

Moment 1. Libraries


If we are talking about the development of real software projects, then we can not consider the language separately from the accompanying libraries. By itself, the language can be interesting and self-sufficient, only when writing demonstration projects and in academic research. When it comes to commercial projects that require heterogeneous functionality and which will need to be maintained for several years, then libraries / packages / old practices that allow you to implement everything you need are primarily considered. And only then it makes sense to talk about the programming language.

Moment 2. Constant complexity


I will express my personal opinion, which is arguably arguable, but it feels that way. The complexity of a medium or large program is a certain constant value that is difficult to change. The language simplifies / complicates the writing of a program in the range of only 10-20%.

Taking a trendy C # against C ++, you can say that it allows you to save significant time in writing, as it automatically frees memory. You do not need endless control over the pointers, the spelling and use of various auto_ptr varieties. I will object. Perhaps this is the case for small projects, but you cannot hide in large projects. As an example, I will retell a case heard from a friend.
')
The project was originally conceived big enough. C # was chosen because it met all the requirements and also simplified development compared to C ++. Year two, the development progressed well. However, when the project exceeded a certain level of complexity and volume, a very unpleasant artifact appeared. Since the process of freeing the memory is uncontrollable, at times pauses of 1-2 seconds began to appear in the application, during which the system deals with the memory, what to release, what is not. Agree very unpleasant when the interface freezes for two seconds, when you simply enter information from the keyboard into the fields. Management found this behavior unacceptable because it annoyed users. Many copies were broken. It seems that developers are not to blame, but something must be done. Now they are doing what divides the project into two interacting parts: the interface and the requests that process it. The idea is that the lightweight interface remains always alive.

Maybe I conveyed the essence of the problem is not accurate, as a new user of the project. But the point is that it is not so easy to hide from complexity, especially using a programming language. Simplified in one place, the probability is high that it will go sideways in another.

Conclusion


To treat new fashionable languages ​​should be easy. It does not even make sense to discuss their advantages and disadvantages. It is worth getting acquainted with new features and no more. When starting a new project, you will have certain conditions, and you may have to make a choice between the good old C / C ++ / Fortran. And only if the conditions allow a wide choice, then it will be worthwhile to recall and think about the choice of Super X or Super Y.

PS


I think that better tit in the hands than a crane in the sky. If you want to learn new things, now it is better to study tools from Intel. Download Parallel Studio , see. This is what will allow you to quickly and easily write programs for parallel systems. The nearest and not the nearest future for us is parallelism!

Source: https://habr.com/ru/post/95118/


All Articles