iOS & Android & Swift & Kotlin

  Переглядів 3,709

Stuart Kent

Stuart Kent

6 років тому

Android and iOS development tools have consistently converged over the past few years. The arrival of Kotlin as a second officially supported language for Android development is perhaps the most significant example of this to date.
Kotlin and Swift were designed independently but share many foundational principles. In this talk, I compare and contrast these exciting languages and show you just how similar their implementations are. I also demonstrate how shared architectures and layout design tool evolution have further aided cross platform parity.
If you’re a cross-platform curious iOS developer, then this talk’s for you! There’s never been a better time to widen your horizons.
Slides: speakerdeck.com/stkent/ios-an...
Venue: Motor City CocoaHeads

КОМЕНТАРІ: 10
@tompov227
@tompov227 4 роки тому
Kotlin does not allow interface conformance with extension but it does allow constrains on self types and generic types. Not with equatable bc everything in Kotlin is equatable but for comparable say, you write fun Iterable.someFunction(): Iterable { } and you can even say `fun C.someLimitedExtensionFun(): C where C: RandomAccess, C: Collection, T: Comparable, T: Serializable {}` It is also worth noting that it is *not* possible to instantiate method as the **sealed** keyword implies **abstract** as well
@pixelPlex
@pixelPlex 6 років тому
For computed read only properties in Kotlin (using a custom getter) the type can be omitted (type inference is applied on the last line in the custom getter).
@stuartkent5182
@stuartkent5182 6 років тому
Nice, good to know, thanks!
@WhatIsThisAllAbout
@WhatIsThisAllAbout 6 років тому
Actual topic starts at 8:20
@spidfire
@spidfire 6 років тому
Just wondering where you found that debug view for android? I'm still struggling though the eclipse one
@stuartkent5182
@stuartkent5182 6 років тому
That feature is called the "Layout Inspector", and it first appeared as an integrated tool in Android Studio 2.2. Here's the official documentation page: tools.android.com/tech-docs/layout-inspector. Have fun!
@spidfire
@spidfire 6 років тому
Thanks :D
@pixelPlex
@pixelPlex 6 років тому
In Kotlin if a function is only returning the result of a "when" then the return type can be omitted, and the function brackets replaced with a "=", eg: // ... fun getUrl(t: Type) = when(t) { VISA -> "/visa" MASTERCARD -> "/mc" DISCOVER -> "/disc" } Kotlin doesn't use the "switch" keyword because the things that can be done with a "when" aren't what you would expect to find with the "switch" statement in other languages. Switch statement has a standard set of behaviours/functionality. Any language implementing "switch" which doesn't stick to the standard behaviour isn't implementing the feature properly.
@stuartkent5182
@stuartkent5182 6 років тому
Yeah, that makes sense r.e. the switch/when statements; this is what I meant when I said "breaking with tradition" but your description captures that much more elegantly :)
Google Data Center 360° Tour
8:29
Google Cloud Tech
Переглядів 5 млн
ВЫШИБАЛЫ - Сатир, Янчик, Джарахов, Миша, Антон Форсаж
1:09:04
NodeJS 22 Just Dropped, Here's Why I'm Hyped
14:31
Theo - t3․gg
Переглядів 61 тис.
Developer Stereotypes to Make You Haha :)
5:52
Marko
Переглядів 21 тис.
Why Some Designs Are Impossible to Improve: Quintessence
33:03
Design Theory
Переглядів 86 тис.
The iPhone 16's BIGGEST Upgrade!
10:33
ZONEofTECH
Переглядів 138 тис.
Hollywood is Using AI! Have You Noticed?
31:20
Curious Refuge
Переглядів 19 тис.
Let's build iOS 16 in React Native 🤔
3:53:49
notJust․dev
Переглядів 199 тис.
ИГРОВОЙ ПК от DEXP за 37 тысяч рублей из DNS
27:53
Ремонтяш
Переглядів 215 тис.
RTX 4070 Super слишком хороша. Меня это бесит
15:22
Рома, Просто Рома
Переглядів 65 тис.