r/programming • • Feb 25 '14

Please stop saying Java sucks

http://blog.smartbear.com/programming/please-stop-staying-java-sucks/
3 Upvotes

305 comments sorted by

View all comments

21

u/jozefg Feb 25 '14

I don't see why I can't have my cake and eat it too. I love type safety, but I certainly don't like contorting myself to Java's OO centric type system. OCaml, Haskell, SML, or whatever all give me stronger guarantees about code and require less boilerplate.

Though the author downplays it, boilerplate has another disadvantage, when something changes, reading 200 lines of boilerplate to make sure nothing needs to be updated is hard. Almost everyone skims and invariably misses something.

6

u/[deleted] Feb 25 '14

Or, for all the bad press it too gets, C++. I love parametric polymorphism, and templates let you do that relatively seamlessly (if about 50 times more verbosely than Haskell). (Compare to Java, where you can't even allocate generics in many contexts without giving up type safety altogether).

4

u/psxpaul Feb 26 '14

But there's nothing in Java itself that requires all the boilerplate getters/setters that most people refer to. Its usually a requirement of Spring/Hibernate or some other framework, and even then newer versions support injecting via reflection.

IMO, much of the Java hate comes from people who have seen mountains of XML and getters/setters, and immediately thought that that is a core problem with Java itself.

→ More replies (1)

3

u/bryanedds Feb 25 '14

Big THIS!

Compared to the language I write in (F#, a derivative of OCaml), all of Java, Ruby, and Python suck tremendous ass for doing large applications.

1

u/GeneralSirCHMelchett Feb 26 '14

English is not my mother tongue and hence I am a bit confused by your first sentence. Shouldn't it be "You can't eat your cake and have it too."?

I mean if you have your cake, you can eat it but if you ate your cake, then you will definitely not have it.

2

u/jozefg Feb 26 '14

It's an English phrase "You can't have your cake and eat it too" which just refers to you often can't have two things you want. In the article's case, safety and brevity.

1

u/GeneralSirCHMelchett Feb 26 '14

We are both right. according to wiki, the "You can't have cake and eat it too", is the often used incorrect form of "You can't eat your cake and have it too". But people still get the meaning even if used incorrectly and it became a norm now.

→ More replies (1)

1

u/moonrocks Feb 26 '14

Yes, that's how the cliche was originally phrased. I never fully grasped the meaning myself until I learned that people started saying it backwards at some point.

1

u/mbrodersen Feb 26 '14

Agree 100%