Hacker News new | past | comments | ask | show | jobs | submit login

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...




Consider applying for YC's Spring batch! Applications are open till Feb 11.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: