DEV Community

Cover image for Java vs C and C++: Why I prefer Java

Java vs C and C++: Why I prefer Java

Akash Dev on July 23, 2023

Now, if you know me, I've been coding in Java for a quite long time, and it was also my first programming language. That's probably the reason why ...
Collapse
 
pauljlucas profile image
Paul J. Lucas

Any competent C++ programmer could write the exact opposite to what you've written as to why C++ is better than Java. These sorts of "My language is better than your language" wars have been going on for decades. Writing yet another one adds nothing new.

Collapse
 
akashdev23 profile image
Akash Dev

I respect your preference for C++. I did not intend to start a language war or to claim that Java is superior to C++ in every aspect. I simply wanted to share my personal experience and opinion on why I prefer Java over C++. I acknowledge that C++ has its own advantages and challenges, and that different programmers may have different criteria for choosing a language. I hope you can understand that my article is not meant to be a definitive or objective comparison, but rather a subjective and personal reflection. Thank you for reading and engaging with my article. 😊

Collapse
 
pauljlucas profile image
Paul J. Lucas

I never said I had a preference for either language.

It never said you claimed that Java was superior to C++ in every respect.

I never said you claimed your post was objective.

I meant that all language comparison posts for any reason (objective, subjective, because it’s Sunday, whatever) have all been done for decades and add nothing new.

Thread Thread
 
akashdev23 profile image
Akash Dev

Thank you for clarifying your perspective, and I apologize if my response seemed to misinterpret your comment. I understand your viewpoint that language comparison posts have been a topic of discussion for a long time and might not always offer entirely new insights.
I respect that different programmers have diverse criteria for choosing their preferred language, and I appreciate your engagement and feedback.
If there's any specific aspect you'd like to discuss further or if you have any suggestions for future articles, I'd be more than happy to hear them. Thank you for taking the time to read my article and share your thoughts.

Thread Thread
 
pauljlucas profile image
Paul J. Lucas

BTW: I just realized your post title including "Ultimate Winner" sure makes it seem like you're alleging objectivity. If instead your title were along the lines of "Why Java is the best language for me" (which you now seem to be claiming instead) then I would have ignored your post entirely.

Thread Thread
 
akashdev23 profile image
Akash Dev

I think it's ok now..

Collapse
 
jmfayard profile image
Jean-Michel πŸ•΅πŸ»β€β™‚οΈ Fayard

I agree with you in general but no in the specific case of C and C++.
It has been proven time and time again that writing secure programs in C and C++ is a task that is too hard for humans so those languages should be retired as soon as humanly possible.
Whether that's with Rust or with go or Java I don't care.

Collapse
 
pauljlucas profile image
Paul J. Lucas

Java secure? Really?

Thread Thread
 
jmfayard profile image
Jean-Michel πŸ•΅πŸ»β€β™‚οΈ Fayard

Before I answer can you describe me what kind of experience you have building large scale and secure C/C++ applications?

Thread Thread
 
pauljlucas profile image
Paul J. Lucas

I never said I did. I never said C/C++ was secure. I only said Java isn’t secure.

Thread Thread
 
jmfayard profile image
Jean-Michel πŸ•΅πŸ»β€β™‚οΈ Fayard • Edited

And while doing that you did a little a straw man fallacy
I know like everyone else that neither Java nor anything else is always secure.
I didn't even promote Java, I think each team should decide what makes sense for them.
That could be Rust, Go, Java, Kotlin, I don't have a clue because I don't know that team's context.

My point was that C and C++ are especially unsafe languages and that it's a real issue.

Thread Thread
 
pauljlucas profile image
Paul J. Lucas

But you offered Java as an alternative presumably because you’re alleging it’s a secure language. My link disproves that. That’s my only point.