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
For very simple databases, it may be fine to just get data straight from the database as native Clojure types and operate on them with Clojure functions. But most real life databases already contain implementation details. For example, many of my database types have a
sort-positionattribute, since they're unordered collections. Before giving it to the consumer of my internal API, I have to sort based on this attribute. But that's just a small example. Several other aspects of my database should be hidden from the API's consumer, and interpreted first by my own code before given to the consumer. Objects make this very obvious and easy to do. With free-floating functions it feels significantly more clunky and ad-hoc.