https://kotlinlang.org logo
#feed
Title
# feed
p

pablisco

01/29/2020, 12:48 AM
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

Adam Powell

01/29/2020, 12:49 AM
1
a

arekolek

01/29/2020, 6:35 AM
honestly that coffee example just confused me more than I ever was about
filter
👍 1
c

curioustechizen

01/29/2020, 6:58 AM
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

uhe

01/29/2020, 8:14 AM
True. Should've called it
keep
and
discard
. 🙂
☝️ 1
p

pablisco

01/29/2020, 8:17 AM
@curioustechizen thank you, that's exactly what happened to me 😁
s

Sam Schilling

01/29/2020, 5:25 PM
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

cedric

01/31/2020, 3:28 AM
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
2 Views