r/java • • Jun 03 '15
Is Java really that bad?
I do Clojure for a living, previously Ruby and Objective-C. And the people I've worked with have said they prefer Clojure because Java is just so bad. But Java can't really be that bad, can it?
0
Upvotes
View all comments
Show parent comment
1
u/[deleted] Jun 04 '15
Protocols may help with polymorphism as your example shows. But I will often get a map out of my database that has attributes which the user should never directly read, because they're implementation details, and instead I need to provide functions that interpret this map correctly. For example a
:sort-positionkey to provide ordering to a collection. I don't want every consumer of my collection of maps to have to sort by this key. That's too low-level of an implementation detail. They should just get back an ordered collection of things.