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

科技回声

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

GitHubTwitter

首页

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

资源链接

HackerNews API原版 HackerNewsNext.js

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

Why everybody love/hate Java?

13 点作者 ronbeltran超过 13 年前

9 条评论

latch超过 13 年前
It's too verbose, it relies on DI to be testable, it has a weird type system (Integer vs int), the generic support is superficial, it lacks lambdas, releases are slow, it lacks a good web framework (yes, I've used play), some of it's behavior (checked exceptions, package-directory matching) are failed experiments.<p>Essentially, it hasn't evolved the way it probably should have. I am no fan of Microsoft, but, if you're going to have a general-purpose class-based static language using C-like syntax, C# is now as far ahead of Java as mutants are ahead of humans.<p>Also, there's a stigma attached to Java: code is over-architected, slow and eats memory like crazy. My experience certainly leads me to believe that this is true, though it seems to say a lot more about Java developers than Java itself.
warrick超过 13 年前
Pure Hate:<p>1. Division of primitive datatypes and objects is ungodly annoying.<p>2. System.arraycopy(), where is the camelCase Java standards fascists?<p>3. .length vs .size() really, why does a primitive have an attribute anyways?<p>4. Date, Time, Calendar are a colossal cluster-f<i></i>* unless your favorite word is Deprecated.<p>5. System.out.println, this is one of the most common output and debugging methods, why is it 18 characters? NO, static imports don't mitigate the idiocy.<p>6. HashMap&#60;String,String&#62; map = new HashMap&#60;String,String&#62;(), seem repetitive to anyone?<p>7. No unsigned data types?<p>8. Everything has to be a class.<p>9. Anonymous inner classes are no alternative to lambdas.<p>10. Generics are broken and Type Erasure for backwards compatibility is simply ridiculous.<p>11. No operator overloading?<p>Besides all these petty annoyances Java isn't fun to code, period. If you think it is you should have a go with Python or better yet Ruby.<p>IMHO Java suffers from two fundamental impairments:<p><pre><code> 1. It is too easy. 2. It is an enterprise programming language. </code></pre> Because it is so easy the community is inundated with nonsense. Because it is burdened by the expectation of massive enterprises it can never change and therefore it can never improve.
评论 #3149842 未加载
genbattle超过 13 年前
The huge upside/downside for me is the sheer power of Java.<p>It has a huge amount of capability and speed, and it forces you into a very structured programming model that works well for large projects. The same applies to eclipse.<p>But for small projects it really is a ten ton hammer. The overhead of setting up full class hierarchies, GUIs, etc. for even the simplest application is huge. Again, the same more or less applies to eclipse.
CyberFonic超过 13 年前
Love: Eclipse, libraries, garbage collection, run anywhere<p>Hate: Eclipse, libraries, Oracle, debug everywhere, accidental complexity, etc<p>Depending on your background and the environments you use, your experience may vary ... Greatly !
traveldotto1超过 13 年前
There is no reason to love or hate a language. Every language has its strengths and weaknesses. C/C++ has its performance advantage but may require more skills and training. Php and Python is simple and fun, but you can't really use Php to write a search index. Java is somewhere in between, but the beauty of Java is its proclaimed "write once, at least test everywhere", which allows it to build up a large developer community very quickly. But that is also the downside of Java for its portability, and that is why many platform has to customize Java for speed such as IBM.
dlitz超过 13 年前
It's too damn slow and chews up way too much memory unless you're writing a single, long-running, multithreaded process. So, it forces you to write all applications as single, long-running, multithreaded processes.<p>Memory-mapped shared libraries? No. Copy-on-write fork()? No. Memory protection? Basically, no. Can be reasonably used to implement ls(1)? No.<p>Another reason why I hate Java is that there are going to be at least 3 people who reply to this saying that Java isn't slow.
dack超过 13 年前
+1 Type safe, autocomplete let me write code quickly.<p>-1 Has lots of boilerplate that requires an IDE to stay sane<p>+1 Pretty fast, good JVM<p>-1 encouragement from the Java community to write slow code<p>+1 Easy-to-understand code through interfaces<p>-1 Unnecessary interfaces and failing unit tests (for stupid reasons) cancels out productivity increases
ekm2超过 13 年前
I used to like Java until i took a data structures and Algorithms class in that language.The syntax was terribly verbose and totally clouded my understanding of the course.After end of semester exams,i switched to python,C and C++.I have no plans of going back such an ugly language.
Sato超过 13 年前
free from hardware details / disconnect from hardware details<p>and, JNI is like an affair