Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Kotlin-techtalk_v0.1

Avatar for frostman frostman
February 10, 2012
72

 Kotlin-techtalk_v0.1

Avatar for frostman

frostman

February 10, 2012
Tweet

Transcript

  1. WHAT IS KOTLIN? 2 •JVM-targeted •Statically typed •Object-oriented •General purpose

    •Programming language •Docs available today Thursday, February 9, 12
  2. WHAT IS KOTLIN? 2 •JVM-targeted •Statically typed •Object-oriented •General purpose

    •Programming language •Docs available today •Public beta in Q1 2012 Thursday, February 9, 12
  3. OUTLINE 3 •Motivation •Design goals •Feature overview •Basic syntax •Classes,

    types, inheritance •Generics Thursday, February 9, 12
  4. OUTLINE 3 •Motivation •Design goals •Feature overview •Basic syntax •Classes,

    types, inheritance •Generics •High-order functions Thursday, February 9, 12
  5. OUTLINE 3 •Motivation •Design goals •Feature overview •Basic syntax •Classes,

    types, inheritance •Generics •High-order functions •Type-safe Groovy-style builders Thursday, February 9, 12
  6. OUTLINE 3 •Motivation •Design goals •Feature overview •Basic syntax •Classes,

    types, inheritance •Generics •High-order functions •Type-safe Groovy-style builders •Pattern matching Thursday, February 9, 12
  7. DESIGN GOALS 5 •Full Java interoperability •Compiles as fast as

    Java •Safer than Java Thursday, February 9, 12
  8. DESIGN GOALS 5 •Full Java interoperability •Compiles as fast as

    Java •Safer than Java •More concise than Java Thursday, February 9, 12
  9. DESIGN GOALS 5 •Full Java interoperability •Compiles as fast as

    Java •Safer than Java •More concise than Java •Way simpler than Scala Thursday, February 9, 12
  10. FEATURE OVERVIEW 1/2 6 •Static null-safety guarantees •Traits (interfaces with

    default impl) •First-class delegation Thursday, February 9, 12
  11. FEATURE OVERVIEW 1/2 6 •Static null-safety guarantees •Traits (interfaces with

    default impl) •First-class delegation •Properties (instead of fields) Thursday, February 9, 12
  12. FEATURE OVERVIEW 1/2 6 •Static null-safety guarantees •Traits (interfaces with

    default impl) •First-class delegation •Properties (instead of fields) •Reified generics Thursday, February 9, 12
  13. FEATURE OVERVIEW 1/2 6 •Static null-safety guarantees •Traits (interfaces with

    default impl) •First-class delegation •Properties (instead of fields) •Reified generics •Declaration-site variance & “Type projections” Thursday, February 9, 12
  14. FEATURE OVERVIEW 1/2 6 •Static null-safety guarantees •Traits (interfaces with

    default impl) •First-class delegation •Properties (instead of fields) •Reified generics •Declaration-site variance & “Type projections” •High-order functions (“closures”) Thursday, February 9, 12
  15. FEATURE OVERVIEW 1/2 6 •Static null-safety guarantees •Traits (interfaces with

    default impl) •First-class delegation •Properties (instead of fields) •Reified generics •Declaration-site variance & “Type projections” •High-order functions (“closures”) •Extension functions Thursday, February 9, 12
  16. FEATURE OVERVIEW 1/2 6 •Static null-safety guarantees •Traits (interfaces with

    default impl) •First-class delegation •Properties (instead of fields) •Reified generics •Declaration-site variance & “Type projections” •High-order functions (“closures”) •Extension functions •Inline-functions (zero-overhead closures) Thursday, February 9, 12
  17. FEATURE OVERVIEW 2/2 7 •Tuples •Modules and build infrastructure •Pattern

    matching •Range expressions Thursday, February 9, 12
  18. FEATURE OVERVIEW 2/2 7 •Tuples •Modules and build infrastructure •Pattern

    matching •Range expressions •String templates Thursday, February 9, 12
  19. FEATURE OVERVIEW 2/2 7 •Tuples •Modules and build infrastructure •Pattern

    matching •Range expressions •String templates •Singletons Thursday, February 9, 12
  20. FEATURE OVERVIEW 2/2 7 •Tuples •Modules and build infrastructure •Pattern

    matching •Range expressions •String templates •Singletons •Operator overloading Thursday, February 9, 12
  21. FEATURE OVERVIEW 2/2 7 •Tuples •Modules and build infrastructure •Pattern

    matching •Range expressions •String templates •Singletons •Operator overloading •Full-featured IDE by JetBrains Thursday, February 9, 12
  22. HELLO, WORLD! package hw.simple fun main(args : Array<String>) : Unit

    { println("Hello, World!"); } fun println(str : String) /* : Unit */ { System.out?.println(str); } 9 Thursday, February 9, 12
  23. TYPES HIERARCHY 11 Any? Any Int? Int Complete lattice ...

    supremum infimum Thursday, February 9, 12