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

CA sounds alert on fake software

The telecommunications sector watchdog has warned companies and individual Internet users from buying fake software, saying it now offers hackers the most common loophole for executing cyber-attacks. The Communications Authority of Kenya (CA), through the National Computer Incident Response Team Co-ordination Centre (National KE-CIRT/CC), warned on Thursday that cybercriminals have changed tack and are now using third-party software to deliver threats to unsuspecting users in an attempt to compromise and steal their personal data. “Though Kenya has not been adversely affected by such attacks as at now, the trend depicts a serious concern in cybercrime management and thus a precaution should be taken when dealing with outsourced products and personnel,” said acting CA director- general Christopher Kemei in a statement. Kenyan businesses lose billions of shillings and troves of sensitive information to hackers every year. SOURCE

President Uhuru Kenyatta sets ablaze world's biggest Ivory Pile #WorthMoreAlive #IvoryBurn

Kenya has burned more than Sh31 billion worth of ivory in a bold sign of commitment to declaring a war on ivory trade and poaching. President Uhuru Kenyatta on Saturday lit fire on the 105 tonnes of ivory, stack up in 11 huge pyramid-shaped pyres, that is expected to burn for at least three days. Speaking at the burning ceremony, President Kenyatta said Kenya will not tolerate ivory trade even as the country has to grapple with “a new generation of poachers with sophisticated weapons who are threatening national heritage and safety of communities.” By destroying the ivory, we declare once and for all that our National Heritage is not for sale. For us ivory is worthless, unless it is on our elephants said the president Check the pictures below:>>>>>

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 ...