News for hackers. Stuff that matters.
Re:Android KTX: Kotlin Development for Android by saagarjha on Monday February 05, 2018 @04:01PM (#16312144)
We've already seen something similar before: when Apple "modernized" many of the their Cocoa Touch APIs to work better with Swift.
Re:Android KTX: Kotlin Development for Android by 1123581321 on Monday February 05, 2018 @04:26PM (#16312346)
Can you elaborate on what we have seen? Modernization in quotes suggests that Apple wasn’t successful.
Re:Android KTX: Kotlin Development for Android by saagarjha on Monday February 05, 2018 @04:35PM (#16312425)
I put modernization in quotes because in most cases it was really a shim placed ontop of the existing Objective-C API that changed some names or parameter types; so, in this case it wasn't quite as extensive as a Java->Kotlin transition would be since Objective-C already supports many "modern" features such as closures.
Re:Android KTX: Kotlin Development for Android by Techonomicon on Monday February 05, 2018 @04:14PM (#16312254)
What does "already seeing this" have to do with any meaningful input on the subject?
Re:Android KTX: Kotlin Development for Android by saagarjha on Monday February 05, 2018 @04:17PM (#16312272)
I was providing a parallel from my experience, which I thought might foster discussion on how such an API improvement might proceed based on historical anecdotes. Was this not a welcome addition?
Re:Android KTX: Kotlin Development for Android by ambulancechaser on Monday February 05, 2018 @04:32PM (#16312394)
i think people are interested in the lessons learned in the past. are you sceptical or hopeful? how did apple's stab at this work out in the past? is it fundamentally flawed or deeply overdue.
Re:Android KTX: Kotlin Development for Android by saagarjha on Monday February 05, 2018 @04:37PM (#16312451)
I think Apple did a pretty good job in most cases when getting their code to work well in Swift. I'm hopeful that this will also be the case with Android, but the hitch is that a lot will have to change. Swift's closures, extensions, etc. already had Objective-C counterparts which were not difficult to translate; but Java, on the other hand, doesn't provide many of the features that Kotlin does (hence the drastic reduction of boilerplate we can see in the blog post).
Re:Android KTX: Kotlin Development for Android by jchw on Monday February 05, 2018 @06:23PM (#16313183)
I thought that was purely just Swift's own translation layer to make Objective C APIs more Swift-y, not an API change.
Re:Android KTX: Kotlin Development for Android by euyyn on Monday February 05, 2018 @06:38PM (#16313274)
There were API changes to make the translation happy, in many cases where conventions weren't being followed strictly.