nfrankel
08/05/2016, 10:28 PMeenriquelopez
08/08/2016, 4:20 PMartem_zin
08/10/2016, 10:47 AMvoddan
08/10/2016, 10:51 AMroman.belov
08/10/2016, 2:30 PMroman.belov
08/12/2016, 11:21 AMeenriquelopez
08/14/2016, 8:46 AMorangy
nfrankel
08/14/2016, 1:18 PMnatpryce
08/15/2016, 10:46 AMjohn.shelley
08/15/2016, 2:30 PMroman.belov
08/15/2016, 2:36 PMjohn.shelley
08/15/2016, 5:31 PMvoddan
08/18/2016, 5:48 AMedvin
08/18/2016, 12:44 PMroman.belov
08/19/2016, 7:23 AMartem_zin
08/19/2016, 7:45 AMClosed by default
is not Ugly, Ugly is that properties declared in classes (not interfaces) are not private
by default!artem_zin
08/19/2016, 7:47 AMIf you write a Kotlin library, please make all of your public functions open. You’ll make life easier on your users in the future.😕
adambl4
08/19/2016, 7:58 AMvoddan
08/19/2016, 8:43 AMorangy
dstarcev
08/19/2016, 11:00 AMUnit
instead of void
?dstarcev
08/19/2016, 11:02 AMregisterCallback(() -> {
/** do stuff */
return Unit.INSTANCE;
})
passsy
08/19/2016, 11:04 AMSAM conversion and Unit returning lambdas
part. I immediately started working around this but there is no other way but providing two methods. WTFpasssy
08/19/2016, 11:07 AM// definitions in Kotlin
fun doSomethingWithClickJavaWay(l: View.OnClickListener){
l.onClick(null)
}
fun doSomethingWithClickKotlinWay(l: (view: View?) -> Unit){
l.invoke(null)
}
consuming it in Kotlin
doSomethingWithClickJavaWay(View.OnClickListener { /*do something*/ })
doSomethingWithClickKotlinWay { /*do something*/ }
consuming in Java
TestKt.doSomethingWithClickJavaWay(new View.OnClickListener() {
@Override
public void onClick(final View v) {
/*do something*/
}
});
TestKt.doSomethingWithClickKotlinWay(new Function1<View, Unit>() {
@Override
public Unit invoke(final View view) {
/*do something*/
return Unit.INSTANCE;
}
});
nfrankel
08/21/2016, 3:37 PMeenriquelopez
08/22/2016, 7:35 AMroman.belov
08/22/2016, 8:42 AM