Why use C++

C++ is known to be a very powerful language. C++ allows you to have a lot of control as to how you use computer resources, so in the right hands its speed and ability to cheaply use resources should be able to surpass other languages. Thanks to C++'s performance, it is often used to develop game engines, games, and desktop apps. Many AAA title video games are built with C++.

Very Complex

Since C++ is rather lower level, the language is huge and you will need to handle a lot of complex things such as memory management and more. You also need to write a lot of code before you can get a working prototype if you're planning on building an app from scratch. Since it will be difficult to grasp how all features in C++ works, you can easily shoot yourself in the foot.
As such, since it's easy for a coding beginner to go astray when learning C++, we strongly recommend learning C++ with a mentor. In addition, C++ has a longer history with game development in general, so there are a lot of proven good practices a C++ mentor from the gaming community can teach you.
ScalabilityC++'s greatest strength is how scalable it could be, so apps that are very resource intensive are usually built with it. Graphics require a lot of resource, which is why the most beautiful 3D games you happily feast your eyes on are often built with C++.

Fast

As a statically typed language, C++ is generally more performant than dynamically typed languages because the code is type-checked before it is executed. Java is gaining ground in terms of speed, but in the end, depending on how talented the C++ developer is, C++ can still be faster than Java.

Control

As mentioned before, since you have a lot of control over how your app uses resources, your app can take up very little resource. All in all, since C++ can be very performant in the right hands, enterprises often use C++ to code functions that have a critical reliance on speed and resource usage.

Highest Overall StackOverflow Answer rate

StackOverflow is a programming Q&A site you will no doubt become intimate with as a coding beginner. While some may argue C++ questions are more likely to be answered because C++ users are more advanced and know how to phrase their questions better, an 83.6% overall answer rate is still quite the feat. C++ is also the 6th most used and followd tag on StackOverflow, with over 69k followers.
C++ is the language you use when there are no opinionated languages whose design decisions perform or even work well with what you’re trying to do. It allows you to control every single abstraction you use from the game objects and high level game logic down to the memory allocation strategies and code optimizations applied by the compiler.
Having that level of control over your code allows you to build an application which is written with the performance characteristics you need rather than the performance characteristics chosen by the language designers which are out of your control.
C++ is generally considered the best language for programming game engines because it's an object oriented programming language that has complete manual control over memory and can get down to bare metal. It compiles directly to target platforms without any unnecessary mucking around with virtual machines. In short, you can wring out every last drop of performance if you know how, and games need that.
Also it is not a given that an application written in C++ will be faster than an application written in another language. In fact the opposite is quite often true since C++ makes it quite easy to shoot yourself in the foot performance wise when you don’t know what you’re doing!



Sourceshttp://www.bestprogramminglanguagefor.me/why-learn-c-plus-plus

- Saransh Kulkarni
TY- K-43

Comments

Post a Comment

Popular posts from this blog

Generalised Linked List (GLL)

Delving into C++

Type Casting And Cast Operators in C++