Skip to main content

Why C++, when python is much easier?

Python is the easiest programming language to date because its syntax is simple to learn and understand, but why is there a need to learn C++?

C++ is a mid-level language as it was developed in 1979 after C. C++ is an extended version of C, where '++' is an increment.  C++, being close to the hardware of the computer, is irreplaceable. It is highly in demand than any other language. You don't need to learn C if you want to learn C++. You can understand the architecture of the computer hardware. It is the most widely used language for game development, applications development, and rendering engines.


Programming Languages
Languages-Pixabay



Python can be used like an object-oriented language but C++ is much more versatile and powerful. Moreover, the main thing which matters is the logic of the program. The logic in both of these languages depends upon the programmer.

Let's see the difference between the languages with an example.
Python
Python-Pixabay

Writing Hello World! Program in Python:


print ('Hello World!')
C++
C++ -Pixabay

Writing Hello World! program in C++:

1- #include <iostream>
2- using namespace std;
3- void main ()
4- {
5-          cout<<"Hello World!";
6- }

In python, we just give the command to the computer without understanding the main process the computer has to do.

Whereas, in C++ we include library functions and header files to understand the main working of the computer. If we haven't included the first two lines in the program, we would have been met with an error. iostream is a library having the compile command. Std is a standard function of taking the input and displaying the output. If we skip the 2nd line of the program, we would have written std::cout instead of cout only, to avoid errors.

C++ provides better job opportunities and high salary. Its main quality is that it's irreplaceable so that the most popular and heavy sites like Facebook, Amazon, Adobe, and Autodesk are C++ centric products.

C++ can be hard and cannot be learned in a day. On the other hand, python is way too easy and its syntax can be learned in minutes. Python may work in situations where C++ is hard.

I recommend learning C++ because when you learn this particular language, python can be learned in minutes if you need to learn. Logic depends upon the user but the thing which differentiates any language from another language is its syntax.

That's all folks. Feel free to comment.



Comments

Post a Comment

Popular posts from this blog

Mushkpuri Diaries

        What else can be better than having fun with friends? A long awaited morning came. We were done with the OHTs, it was exhausting. Who likes exams?               A good turned evil friend of mine, kicked me out of the bed when it was 5 on the clock and I was like WTF. We reached the bus stop at 6. OK, forget about the time, we were in the Bus and we even had breakfast in the Bus. We were about to leave the boundaries of College of Electrical and Mechanical Engineering, NUST (CEME, NUST).             There were 5 Buses, we were in a great number and it was our first trip from CEME, NUST to Mushkpuri top.  4 seniors came in our Bus, afterwards. The term Senior, is often terrifying to some, but we had a lot of fun with them.         When the journey started, our beloved Class Representative (CR) started making crazy faces and moves to entertain us, but we are g...

Who am I? What am I doing? Why am I alive?

Have you ever wondered, what if you were left alone in the world with all the luxuries, but no people? How does it feel?  I guess I will be happy at first, and after enjoying every possible luxurious event, I'll have no one to share it with, leaving me sad and depressed (it's the worst I can imagine).  Have you ever felt lonely in a crowd? I guess, always, when you don't know anyone truly.  Why does it happen? What do we need to do?  It happens because we aren't connected with ourselves, we need some self-assessment to overcome this loneliness.   When something is bothering you or making you feel worthless, and you seek advice, people will tell you to distract yourself and find the activities that you like, but we cannot do it if we are not connected with ourselves and it takes a lot of work, a lot of self-realization, it's a process of knowing ourselves, who we truly are.  We ought to connect with our emotions and try to control them, otherwise, they ...

Secularism everywhere

     The increased rate of secularism in Pakistan is deviating many from their right path. Pakistan is not a secular state, rather it has an Islamic ideology and is known as 'The Islamic Republic of Pakistan'. Even the so-called 'Muftis"(Recognized scholars), nowadays, are offering degrees in the favor of interest policies. When we have our holy book Quran and Allah says in the Quran:      “O ye who believe! fear Allah and give up what remains of your demand for usury, if ye are indeed believers. If ye do it not, take notice of war from Allah and His Messenger.” (al-Baqara 278-279)       It is clear from the verses mentioned above, that devouring usury (interest), is a war against Allah and his Messenger Muhammad (S.A.W.W). Now if anyone, even a Mufti, says that usury is 'Halal' ( Permissible) in Islam, he is truly misguided and misguiding others as well.  The rise of the secularism       People, even of th...