Presentation is loading. Please wait.

Presentation is loading. Please wait.

An introduction to Kotlin

Similar presentations


Presentation on theme: "An introduction to Kotlin"— Presentation transcript:

1 An introduction to Kotlin
Kevin Jones @kevinrjones

2 What Is Kotiln JVM Language Supports immutability Abhors nulls
Object oriented Functional Less cermony than Java

3 You Can Just Code fun main(args: Array<String>) {
println("Hello, World") }

4 Immutability val name:String = "Kevin" val name = "Kevin"
var password:String

5 Templates val name = "Kevin" print("My name is $name")

6 Defining Classes class Person { val name:String
val numberOfChildren: Int }

7 Functions Don't need to be part of a class
Are introduced with the 'fun' keyword Can have default parameters Can have named parameters Can 'extend' existing types infix operator overloading tailrec

8 Programming With Types
Interfaces Classes final by default Inheritance Construction Data Classes

9 object keyword object companion object

10 High level functions Lambdas 'with' and 'apply' closures

11 Filtering and Sorting map flatMap filter predicates

12 Infinite Collections Sequences in Kotlin

13 Kotlin and null Nullable types Safe call 'Elvis' Safe cast !! let
lateinit

14 Kotlin Collections listOf mutableListOf…

15 Higher Order Functions
Inlining noinline

16 Generics Reification

17 Summary A better Java A better C#?


Download ppt "An introduction to Kotlin"

Similar presentations


Ads by Google