Move to Kotlin?

Functional programming really shines when iterating over collections. Compare

val list = readLines("myfile.csv").drop(1).map(MyObj::fromCSV);

to read a CSV file into a list of objects, instead of


List<String> lines = readLines("myfile.csv");
List<MyObj> list = new ArrayList<>();
for(int i = 1; i < lines.size(); i++) { 
    list.add(MyObj.fromCSV(line));
}

The imperative version requires a lot of low-level constructs to achieve the same thing, while the functional alternative just re-combines the same few, well-known operations over and over (drop, filter, map, reduce, etc), with lambdas for custom behavior.

IMO Its illusion :frowning:
You can optimize [icode]for loop[/icode] from 8 lines to 1-2
And some small 2-5 line function to 1
For everything bigger – code become hard to understand

it have some exceptions:
Hard to understand to classic programmers
Maybe future programmers that grow up on some type of function languages of future
be thinking that current languages is stupid and functional is easy to understand,
they even may understand 300-500 lines of functional code in couple second,
But for current generation – its painfully )

p.s if future generation be learning programming from 3-5 years
then in 18 years they be having like 10+ years of real programming XP
and they be ready to making incredible things,
but current generation is stupid comparing to them XD
(or they having IMBA AI that write code for he own ^^)

I personally feel like the functional programming stuff that comes with streams (in Java and Kotlin) and other Kotlin features makes the language far more readable, because it is simply closer to natural language. Even better, it’s way faster to write!