TE
科技回声
首页24小时热榜最新最佳问答展示工作
GitHubTwitter
首页

科技回声

基于 Next.js 构建的科技新闻平台,提供全球科技新闻和讨论内容。

GitHubTwitter

首页

首页最新最佳问答展示工作

资源链接

HackerNews API原版 HackerNewsNext.js

© 2025 科技回声. 版权所有。

Why Java Is Dying

24 点作者 Jaxtek超过 4 年前

15 条评论

throwaway189262超过 4 年前
I&#x27;m a stereotypical Java dev even though I&#x27;ve used many other languages in the past. I think the author missed the point on what Java is designed for. It&#x27;s supposed to be a friendlier, safer, more general purpose C++ for when you need good but not the absolute best performance. And in this I think its the best thing out there.<p>The cruft in Java, and hacks like Lombok to reduce it exist in every statically typed language I&#x27;ve used. And if you&#x27;ve worked on a big enough project you&#x27;ll start to see why dynamic languages like JS and Python are bad choices for enterprise apps.<p>It&#x27;s telling that every major dynamic language now has optional typings. Once you get to a certain size the ceremony around access modifier and statically typed objects makes sense.<p>And the author falls into the common idiom of &quot;the JVM is huge it uses too much ram&quot;. Then advocates for dynamically typed languages with even bigger run times that use multiple times more ram. Dynamic languages like Python and JS, as a generality, use 3-10X as much ram as VM languages like Java and C#. They&#x27;re also equally slower. And the runtime argument makes zero sense. V8 is massive. CPython is massive. Any popular language over time develops a huge runtime.<p>The author also complains about Spring. Spring isn&#x27;t Java. There&#x27;s a ton of Java web frameworks that aren&#x27;t Spring. No matter how much you like Java you can always find common ground hating on Spring.<p>Overall the article is a common set of complaints from developers that never used Java or only did a few Spring tutorials, got frustrated at the complexity of the language, and moved on to something else.<p>Java is one of the fastest popular languages and uses way less ram than many alternatives. And the JVM is a great runtime, not a bloated one. Look at how massive V8 is and the JS standard library is still complete trash compared to Java&#x27;s. The JVM is possibly the best runtime out there, and a big part of why Java is so popular.<p>The JVM has great and fast FFI, profiling, metrics, multiple world class GC&#x27;s, it&#x27;s rock stable, it optimizes code to within spitting distance of C, it handled projects with hundreds of megs of code with no problem.
评论 #25476103 未加载
评论 #25476039 未加载
trinix912超过 4 年前
Ah yes, it&#x27;s one of those articles again...<p>First of all, Spring is not the only framework out there (even tho I really dislike it). If the title were &quot;What I hate about Spring&quot;, it&#x27;d be fine, but hating on an entire language because of one framework just misses the point.<p>&gt; Java’s focus still appears to be on silly rules that dictate what class names should be, what packages they should be in, and if variables should be private or protected. Seriously, who cares?<p>This is the one thing that I like about Java. I can easily <i>guess</i> the names of classes&#x2F;methods. Private variables are private so that they don&#x27;t leak into the public API (ie. encapsulation). The &quot;seriously, who cares?&quot; at the end just discredits the entire article for me.
评论 #25475962 未加载
评论 #25476015 未加载
评论 #25476140 未加载
littlestymaar超过 4 年前
“Better be dead like Java than alive like Rust”<p>Joke aside, while I don&#x27;t like typical Java frameworks&#x27; complexity and haven&#x27;t done any Java in seven years for that reason, calling java dead because “everybody is using microservices” and “why bother with performance when you can just run more workers” is a bit ridiculous.<p>First of all, in practice “everybody uses PHP” is still way closer to the reality. The microservices hype train is real, but it&#x27;s far from ubiquitous in real life and the fashion will probably be dead long before Java (I&#x27;m not saying microservices are bad <i>per se</i>, but it&#x27;s way overused, by companies who have zero scalability issues and adds a lot of engineering complexity).<p>Then there&#x27;s cost: deploying 3 times more machines because you use Python on a high traffic service is a good way to give some margin to the cost-killers in the next LBO.
tobyhinloopen超过 4 年前
I don’t know, is using micro services and a message bus “keeping it simple, stupid”?<p>So far I’ve yet to see a micro services architecture that I don’t think is massively over-engineered.<p>Also you can write your over engineered micro services perfectly fine in Java. There are even very nice tools for that specially designed for Java.
评论 #25475914 未加载
sime2009超过 4 年前
&gt; Simpler code base from not having to worry about concurrency and multi-threading<p>Microservice advocates are so naive it&#x27;s painful. It is only simpler if you completely ignore the downsides of microservices. Taking a &quot;monolith&quot; application and turning it into a distributed application rarely makes it simpler. Now you have to deal with network failures, serialising and deserialising data for what was previously just a method call, API versioning all over the place, kubernetes&#x2F;terraform&#x2F;etc configs from hell, concurrency and race conditions still persist but now they&#x27;re spread across services instead of between threads. You want data consistency and transactions? Forget about it!
评论 #25476982 未加载
dmitriid超过 4 年前
The article isn&#x27;t about Java dying. It&#x27;s about the author&#x27;s gripe with Spring.<p>Undoubtedly, 10 to 15 years ago he&#x27;d write and article about how Java is dying because Struts.<p>20 years ago it would be an article about how it&#x27;s dying because there&#x27;s nothing to compete with the new kids on the block in the web space.<p>Java isn&#x27;t going anywhere. It will probably slowly lose its significance over a few years, but it will be a decade or so before it will actually start dying (if at all).
fierarul超过 4 年前
Clickbait article.<p>&gt; My beef, in fact, is more with frameworks like Spring than Java itself.<p>True. The whole article seems to be about Spring.<p>How about I write an article about how the Python is crap because I can&#x27;t do banking with the Zope libraries? It&#x27;s ridiculous.<p>I would hope these kind of article would die.
skanga超过 4 年前
If you don&#x27;t like Spring then don&#x27;t use Spring!<p>If you don&#x27;t like Annotations then don&#x27;t use Annotations!<p>Then you won&#x27;t need to write inflammatory headlines ...
评论 #25475955 未加载
评论 #25475950 未加载
fzingle超过 4 年前
&gt; Simpler code base from not having to worry about concurrency and multi-threading<p>This kind of thing irks me when I read it. I don&#x27;t understand why people think of microservices as an architecture pattern. To me they seem more like an implementation detail.<p>When it comes to concurrency and multi-threading, microservices mean you have different problems to worry about, not that they go away. I try to get people on my projects to imagine microservices as network function calls. If you diagram out how your data flows, how your concurrency works, you tend to see that a microservice is roughly a thread in a monolith. You gain not worrying much about mutexes or shared memory, but you lose on performance. Languages like Rust let you get close to having your cake and eating it too.<p>It is also a useful exercise for teams to consider &quot;how big does my service need to get before microservices on Python scale better than a 64-core monolith in C&#x2F;C++&#x2F;Java&#x2F;Rust?&quot; Another good question, &quot;if a monolith is stateless, does it scale as well as microservices?&quot;
评论 #25476101 未加载
sumanthvepa超过 4 年前
Spring is completely undebuggable. If you get your annotations wrong, you simply cannot debug the process. I&#x27;m desperately look for tools that can give insight into what objects were auto wired at runtime.
评论 #25477538 未加载
评论 #25476425 未加载
cutler超过 4 年前
Much as I wish Java would just die sadly that&#x27;s not the case as far as business goes. There is probably more money changing hands for Java worldwide than any other language and with new languge features appearing it doesn&#x27;t look likely to change anytime soon.
TedShiller超过 4 年前
Bad title. It’s about Spring not Java.<p>Spring sucks indeed. But Java Play Framework is great
Ziggy_Zaggy超过 4 年前
Lol at ppl who think Java is dying.<p>You haven&#x27;t lived until you&#x27;ve been serious with Java at some point imHo.
coldtea超过 4 年前
Medium clickbait BS.
jimbokun超过 4 年前
Agree with everything he said about Spring especially, but was surprised he advocated Python as the alternative, not Go.<p>Still getting up to speed on Go, but it seems a more straightforward replacement for Java in a microservice context. More performant than Python, trivial to deploy, and provides a good amount of static type checking.
评论 #25476387 未加载
评论 #25475996 未加载