673

Stop comparing programming languages

  • Python is versatile
  • JavaScript is powerful
  • Ruby is elegant
  • C is essential
  • C++
  • Java is robust
you are viewing a single comment's thread
view the rest of the comments
[-] mindbleach@sh.itjust.works 24 points 5 months ago

C++ is all of those, provided you pick any 10% of it.

You're not supposed to cast every spell in the evil grimoire.

[-] BatmanAoD@programming.dev 9 points 5 months ago* (last edited 5 months ago)

Well, except "robust", unless you have very strict code standards, review processes, and static analysis.

(And arguably it's never elegant, though that's almost purely a matter of taste.)

[-] mindbleach@sh.itjust.works 13 points 5 months ago

When the standard for "robust" is Java--

[-] BatmanAoD@programming.dev 7 points 5 months ago* (last edited 5 months ago)

I see where you're coming from, but no matter how many null pointer exceptions there are in Java code, you're almost always protected from actually wrecking your system in an unrecoverable way; usually the program will just crash, and even provide a relatively helpful error message. The JVM is effectively a safety net, albeit an imperfect one. Whereas in C++, the closest thing you have to a safety net, i.e. something to guarantee that invalid memory usage crashes your program rather than corrupting its own or another process's memory, is segfaults, which are merely a nicety provided by common hardware, not required by the language or provided by the compiler. Even then, with modern compiler implementations, undefined behavior can cause an effectively unlimited amount of "bad stuff" even on hardware that supports segfaults.

Additionally, most languages with managed runtimes that existed when Java was introduced didn't actually have a static type system. In particular, Perl was very popular, and its type system is...uh...well, let's just say it gives JavaScript some serious competition.

That said, despite this grain of truth in the statement, I think the perception that Java is comparatively robust is primarily due to Java's intense marketing (particularly in its early years), which strongly pushed the idea that Java is an "enterprise" language, whatever that means.

this post was submitted on 14 Jun 2024
673 points (93.0% liked)

Programmer Humor

19623 readers
1 users here now

Welcome to Programmer Humor!

This is a place where you can post jokes, memes, humor, etc. related to programming!

For sharing awful code theres also Programming Horror.

Rules

founded 1 year ago
MODERATORS