Re:Kotlin 1.0.5 is here
by gregschlom on Tuesday November 08, 2016 @04:15PM
(#12903996)
Wouldn't a `lateinit var` solve the problem in this case? (Although the downside is that now it's a variable)
Otherwise I'm sure you can come up with a good solution using delegated properties or something like that.
Re:Kotlin 1.0.5 is here
by Nullabillity on Wednesday November 09, 2016 @01:42AM
(#12906793)
Oh wow, wasn't aware that existed. Thanks!
Re:Kotlin 1.0.5 is here
by BoorishBears on Tuesday November 08, 2016 @06:48PM
(#12905036)
People still use RoboGuice?
At the moment I use vals, but it still requires me to mark injected dependencies as nullable (and coerce them with !! on use), which feels like I'm fighting the type system.
It would be really nice if there was some sort of "special" null that was of the non-nullable type, but could only be used when initializing variables.