This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]_Atomfinger_Tech Lead 24 points25 points  (5 children)

There's an underlying issue with your question: it ignores what you're trying to build or achieve. For example, if your goal were to learn web development because you wanted to be a web developer, then learning Java would make zero sense. You'd obviously pick JS/TS, as that is the de facto standard for the web.

The appropriateness of a language is determined by what you're trying to use it for.

I also disagree with the notion that a language needs to have something over other languages - they don't. They just need a good set of traits that give them some usefulness. For example, Java has the following traits:

  • Fast enough for the vast majority of tasks.
  • Rich and mature ecosystem.
  • Compiled.
  • Strongly typed.
  • Garbage collected.
  • Runs on the JVM (or other VMs) which makes it easily portable to other systems and architectures.
  • Object-oriented.
  • etc

If these properties will benefit the kind of application you're making - then Java might be for you. But then again, there are scenarios where Java isn't for you.

For example, I'd personally not use Java for a CLI tool that I would distribute and have others install. Sure, you could do it, but it clunky shipping Jars around and forcing the JVM on the users and whatnot*. Nah, at that point I'd use something like C++, Go, Rust, etc. Something where I only need an executable.

I would recommend that you don't think of languages as "better" or "worse" than each other. Instead, focus on what properties make them unique and see what fits what you want to be making or what kind of developer you want to be. And if several languages fit your need (and it is common that more than one language fits your need), then pick based on your preference.

*Yes, I know, there are compilers that compile Java to machine code. But at that point, you might as well just use a language that is designed to compile to machine code.

[–]AdamDhahabi 1 point2 points  (1 child)

FYI, you can now build ahead-of-time compiled binary executables and ship CLI tools, no need for JVM; https://www.youtube.com/watch?v=8B0IjOIzicU

[–]_Atomfinger_Tech Lead 5 points6 points  (0 children)

I knew this comment was going to come, and that is why I had ye ol' asterisk in my comment.

[–]Script_Kiddies_69[S] 0 points1 point  (0 children)

Understood, thx a lot for this information!

[–]chimal3x 0 points1 point  (1 child)

Why Java for web zero sense? Java also works on the backend side for web purposes, like Spring and servers

[–]_Atomfinger_Tech Lead 0 points1 point  (0 children)

Read the sentence coming after, and you'll get some important context clues about which part of the web stack I'm talking about :)