3 ms·
Is not about writing the boilerplate, is about having to think at that level. In Java, you think "I loop through the Strings and if it starts with uppercase, I'
by gclaramunt 13y ago
Is not about writing the boilerplate, is about having to think at that level. In Java, you think "I loop through the Strings and if it starts with uppercase, I'll add it to a new collection (which I need to remember to intialize)", in Scala is more "filter the strings that starts with uppercase".
And even if the IDE can generate most of it, it still shows it to you to modify the template, and even if later hides it, it still in your code, in your diffs.
Besides, higher order functions are not the only thing, traits are an awesome tool for structuring separation of concerns, and java doesn't come closer.