(01-08-2015, 08:04 AM)Sex Slave Wrote: They are indeed useless. I think they are also pretty confusing and render code as less easy to read.
For example, why use a forloop like this:
Code:list.forEach(i -> i.invokeMethod());
When you can simply, and more readably do this:
Code:for(int i : list){
i.invokeMethod();
}
I suggest you look into functional programming languages to see where lambdas come from and why they're so important. Java's lambdas are relatively tame because the language wasn't designed around them from the start. When functions become first class members of a language, the design of everything else starts to shift (toward what has now developed into functional programming).