Slide 1

Slide 1 text

Where We Stand & What’s Next Andrey Breslav

Slide 2

Slide 2 text

Learning materials •  kotlinlang.org –  Language Reference –  API Reference –  Tutorials –  Talk Videos •  try.kotlinlang.org –  Mini-IDE in your browser –  Kotlin Koans •  Kotlin EDU Plug-in •  + books, and much more

Slide 3

Slide 3 text

Where We Stand •  Kotlin 1.0 released in Feb, 2016 – 1.0.1 in March – 1.0.2 in May – 1.0.3 in the summer •  1.1 is feature-driven – EAP will start this summer

Slide 4

Slide 4 text

Others like it (and so will you J)

Slide 5

Slide 5 text

You are not alone •  Lively community – Slack, Forums, StackOverflow – 100+ OSS contributors •  Responsive Team – Regular bugfix updates – Frequent EAP builds

Slide 6

Slide 6 text

KEEP •  Kotlin Evolu\on & Enhancement Process – Proposals from JB and Community – Feedback – Discussions •  h_ps://github.com/Kotlin/KEEP

Slide 7

Slide 7 text

OUR PLANS

Slide 8

Slide 8 text

Lines of Development •  1.0.X — incremental updates –  Bugfixes, Performance –  Tooling –  Source Compa7bility*: Full •  1.1 — language release –  Language features –  Source Compa7bility*: Backward * modulo bugfixes

Slide 9

Slide 9 text

Tooling Plans: 1.0.X •  Incremental compila\on in Gradle •  Spring Support in the IDE •  Reducing the Standard Library Size •  Android Lint Checks •  Jack&Jill Support

Slide 10

Slide 10 text

New Targets •  Java 8/9 –  Generate default methods in interfaces –  Support new collec\on APIs (Streams etc) •  JavaScript –  Run\me modules (amd, umd, common.js, …) –  Common toolchains (npm, browserify, gulp, ...) •  Na\ve –  iOS –  Embedded –  Server-side

Slide 11

Slide 11 text

Scrip\ng: example.kts #!/usr/bin/kotlin import java.io.* for (file in File(“.”).listFiles()) println(file.name)

Slide 12

Slide 12 text

Type Aliases typealias Int32 = Int typealias Predicate = (T) -> Boolean •  Not a “newtype” –  Int can be assigned to Int32 and vice versa –  Value types will cover the newtype use case (later)

Slide 13

Slide 13 text

Bound Method References val p: Predicate = “foo”::equals // behaves as { x -> “foo”.equals(x) } val c: KClass = x.foo()::class •  Kotlin 1.0 only supports Type::foo/Type::class

Slide 14

Slide 14 text

Enhancements for Proper\es •  Local delegated proper\es –  fun foo() { val lazyBar by lazy { ... } while (...) { if (...) { lazyBar.doBaz() ... } •  Inline proper\es –  val foo: Foo inline get() = ... inline set(v) { ... }

Slide 15

Slide 15 text

Hierarchies for Data Classes data class User(val name: String, val age: Int) –  equals()/hashCode()/toString() –  copy() •  val newUser = someUser.copy(name = “Jane Doe”) –  componentN() •  val (name, age) = someUser •  sealed class C() { data class Example(…) : C() }

Slide 16

Slide 16 text

Destructuring in Lambdas myMap.forEach { (k, v) -> println(“$k => $v”) } Map.Entry destructured

Slide 17

Slide 17 text

No content

Slide 18

Slide 18 text

async/await fun loadImage(url: URL) = async { val bytes = await(loadBytes(url)) bytesToImage(bytes) } Suspension point Asynchronous computa\on

Slide 19

Slide 19 text

Corou\nes •  Covers async/await/yield, and much more •  Maximum flexibility – Support for virtually all exis\ng asynchronous APIs – Language is not bound to a given Task framework

Slide 20

Slide 20 text

Corou\nes: Example fun loadImage(url: URL) = async { val bytes = await(loadBytes(url)) bytesToImage(bytes) } Library Func\ons, not keywords!

Slide 21

Slide 21 text

Conclusion •  Come take part in KEEP

Slide 22

Slide 22 text

No content

Slide 23

Slide 23 text

And One More Thing…

Slide 24

Slide 24 text

Images used •  h_p://i.huffpost.com/gen/1307774/thumbs/o-PAGATI-PER-VIAGGIARE-facebook.jpg •  h_ps://vanuatudaily.files.wordpress.com/2012/10/no-school-today-in-vanuatu.jpg •  h_p://laubach.extapps.alphaplus.ca/pluginfile.php/2535/course/summary/learning%20materials.JPG •  h_p://images.clipartpanda.com/knight-shield-clipart-Chrisdesign_weapon_shield.png •  h_p://pngimg.com/upload/hammer_PNG3884.png •  h_ps://upload.wikimedia.org/wikipedia/en/thumb/4/42/Expedia_logo.svg/1024px-Expedia_logo.svg.png •  h_p://fontmeme.com/images/Basecamp-Logo.jpg •  h_ps://web-assets.domo.com/blog/wp-content/uploads/2015/03/connector-square-logo.png •  h_p://info.clearpathsg.com/hs-fs/hub/154661/file-34316289-png/images/pivotal-logo1-resized-600.png •  h_ps://upload.wikimedia.org/wikipedia/commons/thumb/0/0c/Neulix_2014_logo.svg/1280px-Neulix_2014_logo.svg.png •  h_ps://upload.wikimedia.org/wikipedia/commons/thumb/2/2f/Google_2015_logo.svg/1000px-Google_2015_logo.svg.png •  h_ps://s3.amazonaws.com/\tlepages.leanpub.com/kotlin-for-android-developers/hero?1457531118 •  h_ps://images.manning.com/255/340/resize/book/8/9b10436-7580-436b-85f2-0e6d17405ee6/Jemerov-Kotlin-MEAP-HI.png •  h_p://www.garfsblog.uso99.com/wp-content/uploads/2014/04/people-joining-add.jpg •  h_p://www.geotronix.co.id/wp-content/uploads/2016/01/Support2.png •  h_p://www.sheffieldextensions.co.uk/wp-content/uploads/2014/09/blueprints-rolled.jpg •  h_p://www.babybedding.com/images/collec\ons/solid-white-cradle-bedding_large.jpg