Hacker News new | ask | show | jobs
by dwills 3472 days ago
No you are not the only programmer who thinks that languages are going in the wrong direction. For example, the lambda operator of Java 8. All it does is hide the (very useful) name of the method being called. I'm forever having to look up the definition of some arcane single method interface to ascertain the method name so I can have a clue as to what the -> operator is doing/calling. :(
1 comments

Wait what? In context of the typical usage of lambda expressions, the method name does not matter at all. I mean, what difference does it make to you that if it's a Runnable the method is called run(), if it's a Consumer the method is called accept(), and if it's a Function the method is called apply()?

OTOH the usual, pre-Java-8 way of allocating anonymous subclasses when you mean to pass a function is at best obscuring the meaning of your code...