Open voddan opened 8 years ago
I don't think it should be prohibited because there are more cases where it does make sense, but the general idea should be that function types without receiver should be preferred. They are simpler and more intuitive.
When making a function with a lambda parameter prefer a simple lambda without a receiver:
The reason for this recommendations is that every lambda with a receiver shadows
this
, which makes the use of nested operations painful.Cases when a lambda parameter with a receiver is justified: