Skip to main content

Which language is best, C, C++, Python or Java?


I have used each of them for 15-20+ years. There is no best. They have different strengths and weaknesses.

C and C++ require a lot of discipline because you have to do memory management yourself.

C++ is extremely powerful but also very complex.

C and C++ are "dangerous" because, if you are not careful, your program can access and modify data that it is not supposed to touch.

Python is elegant and designed to be easy to use and read. It has the least distractions when it comes to syntax.

The syntax of C, C++ and Java look somewhat similar. Python looks different, it  uses indentation instead of {} to group code.

Python comes with "batteries includes", that means it has a lot of functionality build-in in the standard library.

In Python there is 'one way to solve a problem'. On the other end, in C++ there are way more ways to solve the same problem. This added choice can distract you form solving the problem.

Java has the best IDE support (e.g. eclipse or IntelliJ)

C and C++ are also statically typed, but the preprocessor can add a level of complexity that can make it difficult to be sure what actually happens.

In terms of speed C/C++ are fastest, but for most problems Java is very close in speed. Python can be slow, but if needed critical parts can be written in C. On modern execution speed is rarely the limit - cache behaviour, memory and disc access are the limits.

If you want to learn programming, I would learn python first, then Java, then C and finally C++.

I personally would not recommend C++ because of its complexity. However, if your are disciplined and have a strict set of rules for a project, C++ can be fantastic.

I would use C only for low level stuff, like writing device drivers.

Java is good for large projects, provided you write good APIs and you are carefully modularizing your software.

Python is good for small projects. If the team and the software gets bigger, it can become hard to maintain unless you have a very good test coverage.

Reply by Michael Scharf

Comments

Popular posts from this blog

NJOKI CHEGE on Shisha girls

Twenty years ago, women used to cook like their mothers. Today, they smoke like their fathers. There are fewer things more disgusting than a woman who smokes. And I’m not talking about cigarettes. My beef is with women who smoke shisha. Shisha girls are undesirable, rough and have completely lost respect for themselves. There are two types of shisha girls: the eastlando and the so-called upmarket ones. The eastlando types use cheap perfumes costing Sh350 and buy high heels from Toi Market and Bus Station. They text random men on Fridays “Leo turn up iko wapi, baby?” because they need a man to buy them a pot of shisha. They are happy to go to Club Cubano but will never forget you if you upgrade them to Mojos. They wear their plastic weaves long and coarse, the ones you comb until the scalp protests. The polish on their nails — mostly blue — is chipped and their lipstick ghetto; the ones bought at Moi Avenue for Sh200. Their dreadlocks — if they happen to have them...

There is no regret in Obedience

It’s a guarantee your life will never be the same again when you obey God. God is our CREATOR and our DIRECTOR meaning he knows the best way for our lives since he loves us, our role is to simply OBEY Him. Obedience is everything when we are relating to God. Obedience is the KEY ingredient in the kingdom of God. God is always ready to manifest himself in our lives when we obey Him and his word(John 14:23 Jesus Replied, “Anyone who loves me will obey my teaching. My Father will love them, and we will come to them and make our home with them.” Like 5:5 Simon Peter an experienced fisherman with a fishing business had toiled the whole night without any catch of fish and he was frustrated and tired and he was washing his nets UNTIL Jesus told him to Launch out into the deep again. Peter had a CHOICE to say YES or NO but he choose to OBEY and he said: “Nevertheless AT THY WORD I WILL LET DOWN THE NET”. The moment he chooses to obey instead of Questioning, Analyzing and trying ...

GOVERNMENT OF GOD

MINISTRY OF FINANCE (gold&silver are mine declares the lord) MINISTRY OF EDUCATION >My people  perish because of lack of wisdom MINISTRY OF LAB OUR >The  harvest is abundant but workers are few MINISTRY OF TRANSPORT >Come to me who are tired from heavy loads and I will give you rest MINISTRY OF HEALTH >I took all your infirmities and by stripes your healed MINISTRY OF AGRICULTURE>Am the true vine and my father is the gardener MINISTRY OF SPORTS>Many who are first shall be last and those who are last shall be first. MINISTRY OF INTERNAL SECURITY >No weapon formed against me shall prosper