TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

Ask HN: Would you start new project in Java?

20 pointsby alifazizover 3 years ago
I'm curious, given nowadays we have many progressive tech options to adopt, why would anyone choose Java and what considerations are taken into that decision.

14 comments

auganovover 3 years ago
I don&#x27;t know much about the language, but the JVM is absolutely a tremendous platform. Probably the best JIT compiler and GC for server workloads - by far. Great concurrency story (and may become the absolute best when Loom ships). As far as dynamic [0] languages&#x2F;platforms are concerned, I don&#x27;t think anything comes close to the JVM. Or even tries to [1]. It&#x27;s best exemplified when straightforward JVM ports of other languages easily outperform the original. Graal&#x27;s nodejs can match, sometimes outperform, even V8 performance - which is probably the other most sophisticated and invested-in dynlang runtime. I believe some ex top hotspot people are working on V8 too, so definitely no lack of expertise there, it just takes a different approach. Given the popularity of node, I have to assume tuning it to optimize for server workloads must not be easy.<p>[0] as in not-statically-compiled, Java may be statically typed but the platform is very dynamic<p>[1] CLR&#x2F;C# perhaps, but don&#x27;t know too much about it, I believe its approach is less dynamic and more ad hoc, it can do some things better but perhaps for the wrong reasons.
wlpuover 3 years ago
I am about to do so. Truth be told I am angling for Kotlin over Java, but I wouldn&#x27;t be unhappy if it went that way.<p>Java has come a long way, 17 has a lot of nice language features and Amber, Panama, Loom, Valhalla are all doing great things for the JVM.<p>There&#x27;s also the excellent ecosystem, and some of the Kotlin libraries have quite nice APIs.<p>I think tooling is a plus too, Gradle is a flexible and extensible build tool. I&#x27;ve also been experimenting with Graal, I&#x27;m not committing to using it, but it does look very promising (and has an easy to use plugin for Gradle). We could use it to build some very slim Container images, if it works out.
aristofunover 3 years ago
As much as I love java and jvm as a piece of CS art and my first professional experience — I would see not a single reason to prefer it in 2022 to other alternatives.<p>Except maybe some infra constraints related to big data or legacy systems interconnectivity.<p>In the worst case scenario I would stick to JVM, but not to Java language.<p>Main reason — poor dev experience (for 90-s it was awesome), far outweighed by modern “light” alternatives, like node, go, ruby, python etc.<p>And dev perfomance is #1 factor of any project’s success&#x2F;failure. On account that even lowest salaries are magnitudes higher than cpu&#x2F;memory costs.
dstainerover 3 years ago
I think there are a number of reasons why you would.<p>- Built on top of the JVM<p>- Large number of 3rd libraries, i.e. Jackson, Jetty, Spring Boot, Hibernate, etc.<p>- Mature, can find support in numerous areas<p>- Dependency management, I&#x27;m sure many will disagree but I&#x27;ve found Maven to work well enough for what i need it to do both from dependency management and releasing<p>- It&#x27;s the language I&#x27;m the most efficient with and if I&#x27;m building something brand new I favor speed of iteration over having to stumble over learning a new language. NOTE: I&#x27;d say the same thing about C#, Swift, Javascript, etc. If that either of those were my primary language I&#x27;d do the project in that because speed is your friend when starting out.
评论 #30203162 未加载
bzzztover 3 years ago
It depends on what you&#x27;re trying to do. Front-end Java (applets&#x2F;webstart) is dead. But on the server, or even some embedded devices, Java is working fine.<p>I&#x27;d like to ask &#x27;why not&#x27; - Java is supported, fast enough for lots of applications and a great ecosystem of third party libraries.
评论 #30225825 未加载
crooover 3 years ago
Its an optimal choice for business. Banks, financial institutes, pharm companies and other boring places already has a plethora of experienced and moderately motivated java developers.<p>It&#x27;s hard to sell them new features&#x2F;projects when their devs cannot decypher the language you used. (Eg. scala) You can&#x27;t really put a finger on what you gain from using a new language apart from it&#x27;s harder to find someone to work with it an he will ask for more money.<p>Yeah there is the programmer centric &quot;progressive tech stuff are FUN&quot; view but business usually don&#x27;t care...
waynesonfireover 3 years ago
Absolutely. The reason is that whatever you throw at it, it&#x27;ll handle it well. The technology won&#x27;t get in your way and will scale in just about every meaningful dimension.<p>Use java until you just can&#x27;t bear it. You may get bored of it, we are humans after all. Ill even claim its desirable to build enough experience to be bored of it. Ideally, by this time you&#x27;ll have developed the skills needed to evaluate a technology for adoption. At minimum, use java until you have learned this skill.
strlenover 3 years ago
Yes. Scala and Clojure are my preferred JVM languages, but there are certain frameworks that are highly useful but problematic when used with Scala and&#x2F;or Clojure.<p>* Spring Boot for web services and application. Absolutely amazing and easy to use, my favorite feature is easy integration with external authentication services. Yet there is no longer much Scala support around for Scala and the Spring framework. Clojure may be a bit better in this case as Clojure collections implement the Java collections interfaces unlike Scala. Another issue is heavy use of reflection by frameworks like Spring which tends to work poorly with Scala.<p>* Android applications. Dalvik is a register based and not a stack based VM; scalac produces code optimized for OpenJDK which may run inefficiently on Dalvik.<p>That said in these cases you have the option of using Kotlin. While it does not differ terribly from Java, it supports pattern matching (which I don’t believe is supported by Java, but I may wrong as I haven’t used versions higher than 8 extensively.)
GianFabienover 3 years ago
It depends upon the application and its usage that is being developed.<p>Java has stronger compile time checks than many other languages. The JVM supports several other languages. For long running processes the warm-up time experienced with JITs might be of minimal concern.<p>A critical skill is to sufficiently understand the incompletely defined application in order to choose the most appropriate language(s), framework, environment, infrastructure, tooling. Of course, the experiences and competencies of the development team should also be taken into consideration.
kkirscheover 3 years ago
Not by choice. The JVM is an engineering marvel, but the developer experience for most use cases doesn’t justify its use, e.g. dependency management, JVM tuning, boilerplate (if javas bugs you), etc. I’ve found other cross-compilable languages, like Go and Rust, fit my need when I need to distribute the app and various interpreted or compiled languages work when we operate the software during its maintenance and feature development phases.
thorinover 3 years ago
If you&#x27;re talking web services and you&#x27;re a java expert &#x2F; proficient then sure why not. I used Java Spring a while back and it was fine. You probably want to use what you know. I&#x27;m using .net core web api currently. If you don&#x27;t know anything it&#x27;s a fair option, but so is node, Go, python with flask&#x2F;django and a load of other stuff.
andrewfromxover 3 years ago
No. I would use golang. Mic drop? Not sure what else to say. Try a big go project and you’ll forget all about kotlin or java classic.
A3mercuryover 3 years ago
Personally no because it&#x27;s not really in my toolset. Did some Java in college and some light Minecraft modding years ago but nothing recently.<p>However, Java runs on more devices than anything else right? It&#x27;s still a major player and I can&#x27;t imagine it going away anytime soon.
muzaniover 3 years ago
Nope. Kotlin does everything I&#x27;d want from Java, but better.