bjonnh
08/26/2020, 11:45 PMJavier
08/26/2020, 11:59 PMtextView.setOnClickListener{ ... }
Javier
08/27/2020, 12:00 AMJavier
08/27/2020, 12:01 AMbjonnh
08/27/2020, 12:05 AMNir
08/27/2020, 12:10 AMNir
08/27/2020, 12:11 AMRuckus
08/27/2020, 2:57 AMpankajrai
08/27/2020, 4:00 AMthanksforallthefish
08/27/2020, 6:03 AM(Event) -> Unit
and pass it around. but that is awkward for people trained in OOP (or at least, I think, it took a while to get used to that more FP syntax and I still prefer the more OOP approach) used to have interface to achieve the same.
Depending on your domain, working with interfaces makes your code more consistent, for instance I mostly deal with Spring, everything is interface there, so I prefer to use interfaces myself to be more consistent across an application (though typealias
could bridge the gap, but that is a thought for another day).
all in all I guess the point is to help adoption, now you don’t need to distinguish between java or kotlin interface, SAM supports bothandylamax
08/27/2020, 7:34 AM