Is there something like <https://api.dart.dev/stab...
# stdlib
r
Is there something like https://api.dart.dev/stable/2.8.4/dart-core/Iterable/where.html which makes you express things better than with
filter
or
filterNot
?
d
How is that better than
filter
?
2
g
or I don’t understand something, or it exactly the same If you thing name
where
is better, add an alias (during import or just create inline extension) for
filter
with this name
r
filter could be interpreted as both ”keep” and ”take away”. The way filter works you often resort to inverting the predicate or using filterNot
☝️ 1
this sometimes makes expressions clunky to read
a
I personally like where over filter and have unintentionally typed where only to realise i have to use filter Maybe its because of my active record days
r
this is a java-ism, but filter is a bad name because you sometimes struggle with the predicate
g
I think it's fine if you propose adding such alias, stdlib already have some (first and find for example) I would create a feature request if think it useful kotl.in/issue
r
yes an alias is the only sensible thing of course.