r/programming • • Feb 22 '15

Java Makes Programmers Want To Do Absolutely Anything Else With Their Time

http://www.forbes.com/sites/quora/2015/02/21/java-makes-programmers-want-to-do-absolutely-anything-else-with-their-time/
35 Upvotes

636 comments sorted by

View all comments

Show parent comments

2

u/joequin Feb 22 '15

Layering several layers of abstraction and composing several functions both impair readability in the same way (not that much).

1

u/yogthos Feb 23 '15

I find it does quite the opposite. Composing functions declaratively states what's being done without mixing in implementation details.

When I see a functions called filter I have a hint as to the intent of the operation. When I see a loop, then I have to carefully read through it to separate what's being done from how it's done. This takes more effort on my part to divine the purpose of the code in question.

1

u/joequin Feb 23 '15

That's poorly composed code. It should be broken up into private methods.

1

u/yogthos Feb 23 '15

The fundamental problem is that loops mix the intent with the implementation details.

Declarative style separates them making it easier to understand what the purpose of the code is. Chaining functions to transform data does not impair readability the way looping does.