I thought this may interest some here :) some conc...
# feed
p
I thought this may interest some here :) some concepts can be confusing. Specially when you are used to their meaning in programming before learning English. I still remember the day I realized
String
comes from a "cord/rope" of characters 🤯 https://twitter.com/pablisc0/status/1222171540567085057
🥇 2
a
1
a
honestly that coffee example just confused me more than I ever was about
filter
👍 1
c
Initially I used to think the filter operation filters out rather than filter in. So I used to think that the resulting collection will contain all items from the original except the ones that satisfy the filtering criteria. 🤷‍♂️
👌 1
u
True. Should've called it
keep
and
discard
. 🙂
☝️ 1
p
@curioustechizen thank you, that's exactly what happened to me 😁
s
Coffee example didn’t make sense to me either until Kiran explained it, makes a lot of sense now
I guess I never thought of filter as removing the elements fitting the condition, though I can see how that could be confusing especially as a non-native English speaker.
c
I've never liked the name
filter
, which I still find confusing today since I'm never sure if it filters "in" or "out". I'd have preferred something like
keep
or
keepIf