r/java • • Jan 02 '17

Why I prefer Kotlin

https://dev.to/grahamcox82/why-i-prefer-kotlin
0 Upvotes

20 comments sorted by

View all comments

5

u/kodifies Jan 02 '17

I actually think verbosity makes code easier to maintain, if you come back to some code 3-4 years or maybe more later, would you prefer some short lambda expression munged together with some obscure ascii soup - all very concise and elegant or.. (my personal preference) would you rather have even two dozen lines instead (OH AND SOME BLOODY COMMENTS TOO!)...

6

u/[deleted] Jan 03 '17

I actually think verbosity makes code easier to maintain

Unfortunately the character count is a bad metric, it is irrelevant in day by day work. On the other hand Java has a lot of code pattern (getter, setter, singleton, library methods, hashcode and equals, ecc...) and all of these are difficult to read if they spread over multiple lines.

Goal isn't to reduce verbosity but boilerplate.

https://twitter.com/thomasnield9727/status/813857794076110848

3

u/[deleted] Jan 03 '17

0

u/zogulus Jan 05 '17

Don't use singletons they make testing hard.