4 ms·
Damn Java has a 1:2 like to dislike ratio. Why do people hate on Java? I'm totally biased because it is the first language I learned and I use it daily but seri
by skizm 13y ago
Damn Java has a 1:2 like to dislike ratio. Why do people hate on Java? I'm totally biased because it is the first language I learned and I use it daily but seriously, why the dislike? It is powerful, portable, stable, hard to shoot yourself in the foot with, and tons of standard libraries. Also the libraries (standard or 3rd party) rarely violate the rule of least surprise. I can nearly always guess the right way to do something if I don't know about an object in a library.
Sure it has warts like all other languages -- memory hog, weird design patterns, bulky code -- but a lot of those can be easily avoided or worked with.
Sorry for the rant. I've just never had someone give me a straight answer as to why Java is so disliked. It usually has something to do with design patterns (FactorySingltonParentFactory.helper.blahblahblah) but that's just preference and is hardly the common case with Java code.
- rjzzleep 13y agoBecause the language comes with a culture. Same with C#. C# is a great language. Horribly misused and taught in the weird manner, leading to incredible amounts of indirection that people confuse with abstraction.
- elboru 13y agoI don't dislike Java as a language I learned OOP with it, actually, Java made programming exciting for me when I was learning. But what I really dislike are some tools around Java, maybe this is totally subjective, but I don't like its most common IDEs (NetBeans, Eclipse, JDeveloper), I dislike the look and feel of its default desktop GUI libraries (Swing, AWT) (I know I know, who the hell still develops desktop apps these days?), but what I really dislike(almost hate) are the web frameworks from Oracle. I'm sure there must be several great tools out there that replace those that I don't like, but I haven't had the time to explore.
- geoka9 13y ago> It usually has something to do with design patterns (FactorySingltonParentFactory.helper.blahblahblah) That sums it up for me, basically. I could add that this is a manifestation of the tendency to make things more complex than they need to be which is pervasive in the whole Java ecosystem. IMO, even Scala couldn't escape the curse and suffers from it (although it's a lot more pleasant to use than Java).
- LeafStorm 13y agoWorking with basic data structures like maps, sets, and lists that you don't have to manually allocate takes approximately 20 times as much code as it does in nicer languages like Python.
- kstrauser 13y agoFor me, it's the sheer verbosity. You can't just say "import module; module.function()" without having more boilerplate than code. Also, "hard to shoot yourself in the foot" can sometimes mean "hard to do mystical stuff when you really, really want to". 99% of the time, regardless of language, you should be writing clear, idiomatic code. 1% of the time, though, you want some voodoo (that you can encapsulate so that no one else really has to understand it), and when that time comes you want the language to get out of the way. For example, almost no one needs to write metaclasses in Python. It's just not something most people will ever have a nonzero desire or need to do. But, suppose you're writing an ORM or a templating system or something else were it might be darn handy to create a lot of methods at instantiation time. In those cases, it's incredibly convenient to be able to do the magical stuff at all. You only have to get it right once, then all the downstream users can benefit from a much simplified and cleaner experience. I don't want to shoot my foot. Sometimes, though, I might want to shoot a snake crawling across it. I prefer to use languages that keep things safe in general but allow shoot-footing when you really, really need it.
- skizm 13y agoI get that it is verbose but I kind of like that. It makes reading code less ambiguous. I understand that is just preference though. As for your import example you can totally do that: > import java.util.Collections; Collections.sort(someList); You just have to make use of static methods. I do understand though that a lot of the standard library is not designed like this so your point is taken.
- base698 13y agoFor me it's this: http://steve-yegge.blogspot.com/2006/03/execution-in-kingdom-of-nouns.html http://steve-yegge.blogspot.com/2006/03/execution-in-kingdom... My first real job was programming Java and I have a bit of nostalgia for it, but having to do anonymous inner classes for a simple callback is kind of annoying.
- skizm 13y agoCallbacks would be sweet, but for someone who never really used them till I got heavy into javascript I don't really ever think to use them right away. Also callbacks are mostly for asynchronous stuff which you can get away without using in java a lot of the time (I think, that's really the only time I use them at least).
- Too 13y agoIf you've ever tried C# it's hard to go back to Java without hating it, because they are so similar but Java is much more crippled both language- and standard library-wise.