Hacker News new | ask | show | jobs
by joostdevries 2437 days ago
I agree. Naming parts of your code is important. An alternative to named local vals is to either use named functions instead of lambdas: people.filter(olderThan50) or (I use Kotlin) use named extension functions: people.countOlderThan50()
1 comments

In any nontrivial application, doing this for many of your types, does this not bloat your API considerably, which adds to the cognitive load?