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.

Why I hate Java

21 pointsby adgasfalmost 8 years ago

11 comments

tieTYTalmost 8 years ago
&gt; Why does this matter? It matters for the exact same reason why memory leaks are bad in general: They consume more memory than necessary.<p>Thing is, this doesn&#x27;t usually matter. I have never gotten an out of memory error from a leak in Java. Now compare that to all the development time I&#x27;ve saved by not having to deal with pointer arithmetic. I consider it a huge win. It&#x27;s all about the type of apps you&#x27;re making.
评论 #14712377 未加载
评论 #14712024 未加载
kronos29296almost 8 years ago
I don&#x27;t know about the other things but Even Bjarne Stroustrup calls multiple inheritance the wrong way to go. I don&#x27;t think I&#x27;m better than him. So I disagree on that. The other stuff - Well all languages are imperfect. That&#x27;s why we have so many of them.
lispmalmost 8 years ago
&gt; One problem with garbage collection is that it needs to see the entire memory used by the program even if the program is not using big parts of it for anything.<p>The first generational GC was proposed for Lisp in 1983. See Liebermann&amp;Hewitt. The heap is divided into generations based on the lifetime of objects. Typically only the youngest generation, which is kept small, is scanned. This is based on the observation that a lot of objects are only short-lived. Thus a GC does typically does only need to look at a fraction of the memory.<p>Also GCs might want to use regions of similar objects. That way only those regions need to be looked at, which may free up space for an ohject that wants to be allocated currently.
westoncbalmost 8 years ago
Probably worth jumping up a level in the URL to: <a href="http:&#x2F;&#x2F;warp.povusers.org&#x2F;grrr&#x2F;" rel="nofollow">http:&#x2F;&#x2F;warp.povusers.org&#x2F;grrr&#x2F;</a> —and noting that this comes from the guy&#x27;s &quot;What grinds my gears&quot; page, which also links to a &quot;Why I hate C&quot; article.
carsongrossalmost 8 years ago
Java is a decent language for its time, with a bad default tool set and a development culture that leans very heavily towards J2EE-style verbosity (javascript is trending that way now too, w&#x2F; angular, react, etc).<p>The JVM, however, is a national treasure.
yincrashalmost 8 years ago
&quot;Why I hate garbage collected languages&quot;
评论 #14711973 未加载
评论 #14721959 未加载
评论 #14711912 未加载
评论 #14712291 未加载
maxxxxxalmost 8 years ago
I ma not sure about the rest of the points made but I agree about the lack of deterministic destructors to free up external resources. C# has the same problem. It would be really good if the destructor ran when the reference count of an object goes to 0. This would make a lot of code that deals with OS resources much cleaner.
评论 #14712041 未加载
评论 #14712593 未加载
Analemma_almost 8 years ago
Is there a date on this? This feels like a (1997) article at the latest.
评论 #14711919 未加载
评论 #14711951 未加载
评论 #14711938 未加载
评论 #14711968 未加载
评论 #14711943 未加载
burntrelish1273almost 8 years ago
Risking discussing religiousity:<p>Java as a language has some rough-edges: multiple inheritance and verbosity. Personally, I&#x27;d use Kotlin if there were a requirement to run on the JVM.<p>In terms of the JVM:<p>Erlang VM is under-appreciated: each &quot;process&quot; (not an OS process and lighter than an OS thread) has its own heap so there&#x27;s no global GC pauses, share-nothing and let-it crash doesn&#x27;t take out Erlang VM.<p>For anyone stuck on JVM, look at Azul&#x27;s free Zing for shorter&#x2F;less GC pauses and a generally faster JVM.
sanboralmost 8 years ago
What about the point of gc solving the issue of your app crashing or security issues everywhere because a malformed input ends up crashibg&#x2F;executing code? In the debian security mail list almost every week there is a path for that situation so looks like it&#x27;s pretty common.
评论 #14712048 未加载
TheGuyWhoCodesalmost 8 years ago
Should add 2006 to the title...