5 ms·
The note with Java is spot on. Even with the new language constructs in Java 8 (map, stream, lambda etc). More than one time I've to stop and decide whether to
by NhanH 12y ago
The note with Java is spot on. Even with the new language constructs in Java 8 (map, stream, lambda etc). More than one time I've to stop and decide whether to just use for loop rather than any of those higher level constructs. There are several cases where the use of map/ lambda looks worse than a for loop (when you have to chain them together, and the function to be used is not a class function etc.). And ugh, I have to "collect" after a map, what is that?
If a for loop is 3 line, and you have to write 3 line with a whole bunch of "." for a map statement, it's probably of no help in term of expressiveness.
- Retra 12y agoEven those higher-level constructs in Java are ugly verbose hacks... I was excited to have those, but when they came out all I could think was "this is more work than doing it the old way..."