When you care more about getting it done quickly than legibility and you know your functional programming muscle memory a millimeter above good enough to do it in one take.
Also the "i=>i" idiom to filter nulls (or empty strings here), however prevalent it may be, weakens code legibility as opposed to a filter condition written more literally, or ideally if the API has a built in is_null (or is_empty) function intended to be named as a lambda.
Separately to that, for dynamic types it irks me if "i=>i" also throws out zero, false or such. Even if intended, it does so illegibly!
[ + ] JustALover
[ - ] JustALover 0 points 5 monthsNov 30, 2024 01:35:37 ago (+0/-0)
Even more worthless in 5 years, when you have to come back to it to fix something.
[ + ] x0x7
[ - ] x0x7 [op] 0 points 5 monthsDec 1, 2024 08:08:15 ago (+0/-0)
[ + ] Sleazy
[ - ] Sleazy 1 point 5 monthsNov 30, 2024 00:43:14 ago (+1/-0)
code in basic
[ + ] Trope
[ - ] Trope 1 point 5 monthsNov 30, 2024 02:16:04 ago (+1/-0)
[ + ] SithEmpire
[ - ] SithEmpire 1 point 5 monthsNov 30, 2024 04:23:05 ago (+1/-0)
get_thing(source)
.split(delimiter)
.transform(somehow)
...
Also the "i=>i" idiom to filter nulls (or empty strings here), however prevalent it may be, weakens code legibility as opposed to a filter condition written more literally, or ideally if the API has a built in is_null (or is_empty) function intended to be named as a lambda.
Separately to that, for dynamic types it irks me if "i=>i" also throws out zero, false or such. Even if intended, it does so illegibly!