Open omainegra opened 8 years ago
@artem-zinnatullin what do you think about adding alias method for object
for better experience in Kotlin?
I'd just add extension function in the project that uses StorIO :)
On Thu, 21 Jul 2016, 22:48 Ilya Zorin, notifications@github.com wrote:
@artem-zinnatullin https://github.com/artem-zinnatullin what do you think about adding alias method for object for better experience in Kotlin?
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/pushtorefresh/storio/issues/638#issuecomment-234363358, or mute the thread https://github.com/notifications/unsubscribe-auth/AA7B3EuC9cil4R2Htc7SgPEBO_-OGEghks5qX80ngaJpZM4IDdRg .
Ok, since Kotlin is now an official Android language we need to actually resolve this in 2.0.0
@artem-zinnatullin could you provide example of that extension function, please?
Something like this should work:
fun <T> PreparedGetObject.Builder<T>.kobject(type: Class<T>) = this.`object(type)`
Methods
Prepared*.object
have collision with kotlinobject
reserved word. It's kind of ugly be calling this waystorIOSQLite.delete().
object(toDelete)