3 ms·
Small want item about Java Streams... I wish this was a language feature. Allow type declarations in lambdas: currently: collection.stream()....bunch of stuff.
by exabrial 8y ago
Small want item about Java Streams... I wish this was a language feature. Allow type declarations in lambdas:
currently:
collection.stream()....bunch of stuff....forEach(item -> something(item))....
this would be nice:
collection.stream()....bunch of stuff....forEach(String item -> something(item))....
When you get 50 levels deep on a really long lambda, this would make debugging the things far easier.
- mc13 8y agoIt is definitely possible to specify the type of the parameter(s) in a lambda expression in Java.