SlideShare a Scribd company logo
ONE LANGUAGE TO RULE THEM ALL.
Sevil Guler - 11.12.2017
HOLD ON! HERE IS KOTLIN.
EXPECTATIONS ?
HISTORY
▸ Not new at all 2011 -> 2012, Saint
Petersburg
▸ Created by Jetbrains
To increase their productivity
Drive company business by
keeping trust
Drive sales of Intellij IDEA
▸ February 15, 2016
▸ Google IO - 2017
INTRODUCTION
▸ Industrial-strength Object Oriented language - it is pragmatic
▸ Open Source
▸ Interoperable with Java
▸ Concise and Expressive
▸ Easy to learn
▸ Terrific Support and great tools
▸ Safe
▸ Better Efficiency as a Programmer
LANGUAGE FEATURES
▸ Static typing
Compile time
1. Performance is better
2. More reliable
3. Easier to maintain
Type Inference (in contrast to Java)
▸ Object Oriented and Functional
Design around object and supports OO concepts
Not purely functional but :
A. Lambda Expressions
B. First class functions, immutability and no side effects
▸ Lambdas (High Order Functions)
▸ Compatible
▸ Incremental Compilation
▸ Null Safety
Java Code is defensive (NPE)
Safe Call Operator (?)
Safe Cast Operator (as?)
Elvis Operator (?:)
LANGUAGE FEATURES
▸ Extension Functions
Extend any class with new feature even we don’t have access to the source
code
▸ Operator Overloading
Can provide implementation for a predefined set of operators like +, =, ==
▸ Generics
Different types, same behaviour
Reflection, smart casts, companion objects, range expressions etc.
▸ Data Classes
Simplify classes
Separate pure data from business logic
COMPARING TO JAVA
1. Checked Exceptions
2. Primitives types
3. Static members
4. Non-private fields
5. Wildcard types
1. Lambda expressions (inline functions)
2. Extension functions
3. Null Safety
4. Sealed Classes
5. Smart casts
6. String templates
7. Properties
8. Singletons
9. Operator Overloading
10. Companion Objects
11. Data Classes
12. Coroutines
13.……
JAVA: 5 - KOTLIN : 0 JAVA: 0 - KOTLIN : 13…
Sevil Guler - 11.12.2017
COMPARING TO JAVA
COMPARE WITH
▸ Same conciseness and expressive code
BUT Kotlin wins
with static typing and null safety
‣ Difficult to compare but …
‣ Very similar where Swift is LLVM based and
C interop
THE PRESENT OF THE KOTLIN
▸ Google, Amazon, Foursquare, Capital One, Coursera,
Basecamp,Netflix, Uber, Trello, Pinterest, Corda etc. are using Kotlin
▸ Google I/O
THE PRESENT OF THE KOTLIN
▸ It is not only Java/Android language but compile projects
can also compile into JS.
THE PRESENT OF THE KOTLIN
▸ JavaScript target, allowing you to compile Kotlin code to JS and
to run it in your browser - Kotlin 1.1.
▸ Concept of common module - platform specific functionality for
multiplatform project - Kotlin 1.2.
A multiplatform project allows you to build multiple tiers of
your application
Reuse the code between JVM and JS
write the business logic of your application once, and
reuse it across all tiers of your application – the
backend, the browser frontend and the Android
mobile app.
KOTLIN EXAMPLES
▸ Example 1:
▸ if (object != null && object.getOtherObject() != null) {
String someString = object.getOtherObject().getString();
if (someString != null) {
return someString;
}
return “”;
} —- >JAVA
▸ return object?.getOtherObject()?.getString() ?: “" —-> KOTLIN
▸ Some more examples -> Intellij IDEA
THE FUTURE OF THE KOTLIN
★ Support for machine code Kotlin/Native - >
✴ Windows (x86_64 only at the moment)
✴ Linux (x86_64, arm32, MIPS, MIPS little endian)
✴ MacOS (x86_64)
✴ iOS (arm64 only)
✴ Android (arm32 and arm64)
✴ WebAssembly (wasm32 only)
★ iOS applications (reusing code with Android)
★ Embedded systems/IoT (e.g., Arduino and beyond)
★ Data analysis and Scientific Computing
DISADVANTAGES
▸ larger file package size than one built purely in Java.
▸ Build time for Kotlin is a little slower using Gradle
▸ Method count
A Brief Overview of Kotlin

More Related Content

What's hot (20)

PDF
freeCodeCamp Tokyo meetup 19
健太 田上
 
PPTX
Typescript kata The TDD style 2 edition
Ronnie Hegelund
 
PDF
MongoDB Jump Start
Haim Michael
 
PDF
Productive Android developers (Meetup slides)
Michal Juhas
 
PDF
Dsl로 만나는 groovy
Seeyoung Chang
 
PPTX
Lessons Learnt from Backend Systems Development
Michal Juhas
 
PDF
Venkat Subramaniam Blending Java With Dynamic Languages
deimos
 
PDF
Java vs kotlin
RupaliSingh82
 
PDF
JavaScript, Node, and Drones: The Story of NodeCopter
Romain Huet
 
PDF
A brief intro to RubyMotion
Kamil Lelonek
 
ODP
IDE as a Front-end and Fast time-to-market language support in Eclipse IDE re...
Mickael Istria
 
PPTX
How do we test nodejs apps?
Michal Juhas
 
ODP
TypeScript
Jon Vallet
 
PPTX
What's new with Kotlin - Google IO18' extended Covenant University.
SimileoluwaAluko
 
PDF
Polyglot Programmer
João Cerdeira
 
PDF
Scala vs ruby
Kamil Lelonek
 
PDF
Intro to Crystal Programming Language
Adler Hsieh
 
PDF
DevNight #1 (Kotlin) @ The Brick Space
Jedsada Tiwongvokul
 
freeCodeCamp Tokyo meetup 19
健太 田上
 
Typescript kata The TDD style 2 edition
Ronnie Hegelund
 
MongoDB Jump Start
Haim Michael
 
Productive Android developers (Meetup slides)
Michal Juhas
 
Dsl로 만나는 groovy
Seeyoung Chang
 
Lessons Learnt from Backend Systems Development
Michal Juhas
 
Venkat Subramaniam Blending Java With Dynamic Languages
deimos
 
Java vs kotlin
RupaliSingh82
 
JavaScript, Node, and Drones: The Story of NodeCopter
Romain Huet
 
A brief intro to RubyMotion
Kamil Lelonek
 
IDE as a Front-end and Fast time-to-market language support in Eclipse IDE re...
Mickael Istria
 
How do we test nodejs apps?
Michal Juhas
 
TypeScript
Jon Vallet
 
What's new with Kotlin - Google IO18' extended Covenant University.
SimileoluwaAluko
 
Polyglot Programmer
João Cerdeira
 
Scala vs ruby
Kamil Lelonek
 
Intro to Crystal Programming Language
Adler Hsieh
 
DevNight #1 (Kotlin) @ The Brick Space
Jedsada Tiwongvokul
 

Similar to A Brief Overview of Kotlin (20)

PPTX
Android with kotlin course
Abdul Rahman Masri Attal
 
PPTX
Android Development with Kotlin course
GoogleDevelopersLeba
 
PPTX
Introduction_to_Kotlin.pptx
HARSHITJAIN068
 
PDF
Kotlin for android development
Jalpesh Vasa
 
PDF
Top Object-Oriented Programming Languages To Follow In December 2022.pdf
JamesEddie2
 
PDF
Top 10 Tips for Developing Android Apps Using Kotlin
SofiaCarter4
 
PPT
Java for C++ programers
Salahaddin University-Erbil
 
PDF
130700548484460000
Tanzeel Ahmad
 
PDF
Anko - The Ultimate Ninja of Kotlin Libraries?
Kai Koenig
 
PDF
Kotlin vs Java- Finding The All-Time Favorite Fit!
Techugo
 
PDF
A Review Paper on Kotlin Programming Language
ijtsrd
 
PDF
Bootify Yyour App from Zero to Hero
EPAM
 
PPT
BP203 limitless languages
Mark Myers
 
PDF
Kotlin native for iOS and Android
Shady Selim
 
PPTX
Introduction to Kotlin
T.M. Ishrak Hussain
 
PDF
Java vs Kotlin_ Which is the Best for Android App Development.pdf
Quickway Infosystems
 
PPTX
What is Kotlin Multiplaform? Why & How?
Shady Selim
 
PDF
Kotlin for Android
Han Yin
 
Android with kotlin course
Abdul Rahman Masri Attal
 
Android Development with Kotlin course
GoogleDevelopersLeba
 
Introduction_to_Kotlin.pptx
HARSHITJAIN068
 
Kotlin for android development
Jalpesh Vasa
 
Top Object-Oriented Programming Languages To Follow In December 2022.pdf
JamesEddie2
 
Top 10 Tips for Developing Android Apps Using Kotlin
SofiaCarter4
 
Java for C++ programers
Salahaddin University-Erbil
 
130700548484460000
Tanzeel Ahmad
 
Anko - The Ultimate Ninja of Kotlin Libraries?
Kai Koenig
 
Kotlin vs Java- Finding The All-Time Favorite Fit!
Techugo
 
A Review Paper on Kotlin Programming Language
ijtsrd
 
Bootify Yyour App from Zero to Hero
EPAM
 
BP203 limitless languages
Mark Myers
 
Kotlin native for iOS and Android
Shady Selim
 
Introduction to Kotlin
T.M. Ishrak Hussain
 
Java vs Kotlin_ Which is the Best for Android App Development.pdf
Quickway Infosystems
 
What is Kotlin Multiplaform? Why & How?
Shady Selim
 
Kotlin for Android
Han Yin
 
Ad

Recently uploaded (20)

PPTX
Hardware(Central Processing Unit ) CU and ALU
RizwanaKalsoom2
 
PDF
Linux Certificate of Completion - LabEx Certificate
VICTOR MAESTRE RAMIREZ
 
PDF
Top Agile Project Management Tools for Teams in 2025
Orangescrum
 
PDF
HiHelloHR – Simplify HR Operations for Modern Workplaces
HiHelloHR
 
PPTX
Finding Your License Details in IBM SPSS Statistics Version 31.pptx
Version 1 Analytics
 
PDF
[Solution] Why Choose the VeryPDF DRM Protector Custom-Built Solution for You...
Lingwen1998
 
PDF
MiniTool Partition Wizard Free Crack + Full Free Download 2025
bashirkhan333g
 
PDF
SAP Firmaya İade ABAB Kodları - ABAB ile yazılmıl hazır kod örneği
Salih Küçük
 
PDF
vMix Pro 28.0.0.42 Download vMix Registration key Bundle
kulindacore
 
PPTX
Agentic Automation Journey Series Day 2 – Prompt Engineering for UiPath Agents
klpathrudu
 
PDF
유니티에서 Burst Compiler+ThreadedJobs+SIMD 적용사례
Seongdae Kim
 
PPTX
Change Common Properties in IBM SPSS Statistics Version 31.pptx
Version 1 Analytics
 
PDF
MiniTool Partition Wizard 12.8 Crack License Key LATEST
hashhshs786
 
PDF
Driver Easy Pro 6.1.1 Crack Licensce key 2025 FREE
utfefguu
 
PDF
The 5 Reasons for IT Maintenance - Arna Softech
Arna Softech
 
PPTX
ChiSquare Procedure in IBM SPSS Statistics Version 31.pptx
Version 1 Analytics
 
PPTX
Help for Correlations in IBM SPSS Statistics.pptx
Version 1 Analytics
 
PDF
iTop VPN With Crack Lifetime Activation Key-CODE
utfefguu
 
PDF
Build It, Buy It, or Already Got It? Make Smarter Martech Decisions
bbedford2
 
PPTX
Milwaukee Marketo User Group - Summer Road Trip: Mapping and Personalizing Yo...
bbedford2
 
Hardware(Central Processing Unit ) CU and ALU
RizwanaKalsoom2
 
Linux Certificate of Completion - LabEx Certificate
VICTOR MAESTRE RAMIREZ
 
Top Agile Project Management Tools for Teams in 2025
Orangescrum
 
HiHelloHR – Simplify HR Operations for Modern Workplaces
HiHelloHR
 
Finding Your License Details in IBM SPSS Statistics Version 31.pptx
Version 1 Analytics
 
[Solution] Why Choose the VeryPDF DRM Protector Custom-Built Solution for You...
Lingwen1998
 
MiniTool Partition Wizard Free Crack + Full Free Download 2025
bashirkhan333g
 
SAP Firmaya İade ABAB Kodları - ABAB ile yazılmıl hazır kod örneği
Salih Küçük
 
vMix Pro 28.0.0.42 Download vMix Registration key Bundle
kulindacore
 
Agentic Automation Journey Series Day 2 – Prompt Engineering for UiPath Agents
klpathrudu
 
유니티에서 Burst Compiler+ThreadedJobs+SIMD 적용사례
Seongdae Kim
 
Change Common Properties in IBM SPSS Statistics Version 31.pptx
Version 1 Analytics
 
MiniTool Partition Wizard 12.8 Crack License Key LATEST
hashhshs786
 
Driver Easy Pro 6.1.1 Crack Licensce key 2025 FREE
utfefguu
 
The 5 Reasons for IT Maintenance - Arna Softech
Arna Softech
 
ChiSquare Procedure in IBM SPSS Statistics Version 31.pptx
Version 1 Analytics
 
Help for Correlations in IBM SPSS Statistics.pptx
Version 1 Analytics
 
iTop VPN With Crack Lifetime Activation Key-CODE
utfefguu
 
Build It, Buy It, or Already Got It? Make Smarter Martech Decisions
bbedford2
 
Milwaukee Marketo User Group - Summer Road Trip: Mapping and Personalizing Yo...
bbedford2
 
Ad

A Brief Overview of Kotlin

  • 1. ONE LANGUAGE TO RULE THEM ALL. Sevil Guler - 11.12.2017 HOLD ON! HERE IS KOTLIN.
  • 3. HISTORY ▸ Not new at all 2011 -> 2012, Saint Petersburg ▸ Created by Jetbrains To increase their productivity Drive company business by keeping trust Drive sales of Intellij IDEA ▸ February 15, 2016 ▸ Google IO - 2017
  • 4. INTRODUCTION ▸ Industrial-strength Object Oriented language - it is pragmatic ▸ Open Source ▸ Interoperable with Java ▸ Concise and Expressive ▸ Easy to learn ▸ Terrific Support and great tools ▸ Safe ▸ Better Efficiency as a Programmer
  • 5. LANGUAGE FEATURES ▸ Static typing Compile time 1. Performance is better 2. More reliable 3. Easier to maintain Type Inference (in contrast to Java) ▸ Object Oriented and Functional Design around object and supports OO concepts Not purely functional but : A. Lambda Expressions B. First class functions, immutability and no side effects ▸ Lambdas (High Order Functions) ▸ Compatible ▸ Incremental Compilation ▸ Null Safety Java Code is defensive (NPE) Safe Call Operator (?) Safe Cast Operator (as?) Elvis Operator (?:)
  • 6. LANGUAGE FEATURES ▸ Extension Functions Extend any class with new feature even we don’t have access to the source code ▸ Operator Overloading Can provide implementation for a predefined set of operators like +, =, == ▸ Generics Different types, same behaviour Reflection, smart casts, companion objects, range expressions etc. ▸ Data Classes Simplify classes Separate pure data from business logic
  • 7. COMPARING TO JAVA 1. Checked Exceptions 2. Primitives types 3. Static members 4. Non-private fields 5. Wildcard types 1. Lambda expressions (inline functions) 2. Extension functions 3. Null Safety 4. Sealed Classes 5. Smart casts 6. String templates 7. Properties 8. Singletons 9. Operator Overloading 10. Companion Objects 11. Data Classes 12. Coroutines 13.…… JAVA: 5 - KOTLIN : 0 JAVA: 0 - KOTLIN : 13… Sevil Guler - 11.12.2017
  • 9. COMPARE WITH ▸ Same conciseness and expressive code BUT Kotlin wins with static typing and null safety ‣ Difficult to compare but … ‣ Very similar where Swift is LLVM based and C interop
  • 10. THE PRESENT OF THE KOTLIN ▸ Google, Amazon, Foursquare, Capital One, Coursera, Basecamp,Netflix, Uber, Trello, Pinterest, Corda etc. are using Kotlin ▸ Google I/O
  • 11. THE PRESENT OF THE KOTLIN ▸ It is not only Java/Android language but compile projects can also compile into JS.
  • 12. THE PRESENT OF THE KOTLIN ▸ JavaScript target, allowing you to compile Kotlin code to JS and to run it in your browser - Kotlin 1.1. ▸ Concept of common module - platform specific functionality for multiplatform project - Kotlin 1.2. A multiplatform project allows you to build multiple tiers of your application Reuse the code between JVM and JS write the business logic of your application once, and reuse it across all tiers of your application – the backend, the browser frontend and the Android mobile app.
  • 13. KOTLIN EXAMPLES ▸ Example 1: ▸ if (object != null && object.getOtherObject() != null) { String someString = object.getOtherObject().getString(); if (someString != null) { return someString; } return “”; } —- >JAVA ▸ return object?.getOtherObject()?.getString() ?: “" —-> KOTLIN ▸ Some more examples -> Intellij IDEA
  • 14. THE FUTURE OF THE KOTLIN ★ Support for machine code Kotlin/Native - > ✴ Windows (x86_64 only at the moment) ✴ Linux (x86_64, arm32, MIPS, MIPS little endian) ✴ MacOS (x86_64) ✴ iOS (arm64 only) ✴ Android (arm32 and arm64) ✴ WebAssembly (wasm32 only) ★ iOS applications (reusing code with Android) ★ Embedded systems/IoT (e.g., Arduino and beyond) ★ Data analysis and Scientific Computing
  • 15. DISADVANTAGES ▸ larger file package size than one built purely in Java. ▸ Build time for Kotlin is a little slower using Gradle ▸ Method count