SlideShare uma empresa Scribd logo
1 de 27
Baixar para ler offline
Kotlin: The Language of The
Future For JVM?
Leonardo Zanivan @ JavaOne Latin America 2016 [SES12196]
Who am I?
➔ Leonardo Zanivan
◆ Software Architect
◆ OSS Contributor
◆ GUJavaSC Member
◆ JCP Member
First things first
➔ Why Kotlin?
◆ Concise
◆ Safe
◆ Versatile
◆ Interoperabile
◆ Tooling
First things first
➔ History
◆ Conceived in 2010
◆ Language and compiler are open source (Apache 2)
◆ To be a modern industry standard language
◆ With static typing and a smooth migration path
First things first
➔ Why should I care?
◆ Enterprise class support
◆ Production ready
◆ Java #1 language
◆ Productivity
First things first
➔ Who is using?
◆ GMC
◆ Expedia
◆ Prezi.com
◆ Telegram
◆ 99 Taxis
◆ JetBrains (IDEA, YouTrack, TeamCity)
Easy to learn
➔ Extensive documentation
◆ Online reference http://kotlinlang.org/docs
◆ Online editor & training http://try.kotlinlang.org
◆ Language documentation (PDF with 153 pages)
◆ Books (Kotlin in Action and Kotlin for Android)
◆ GitHub and StackOverflow activity
Easy to learn
➔ Fast startup
◆ Intuitive, easy to read & write (opposed to Scala)
◆ No force Functional or OOP styling
Easy to learn
Online editor & training http://try.kotlinlang.org
Easy to use
➔ Tooling support
◆ IDEA Community & Ultimate
◆ Android Studio
◆ Eclipse
◆ Maven / Ant / Gradle
◆ NetBeans plugin (experimental)
◆ Sonar plugin (experimental)
Multi target support
➔ Java
➔ Android *
➔ JavaScript (experimental)
Easy to migrate
➔ Mix Java and Kotlin source files in the same project
➔ Java to Kotlin source conversion tool
➔ Compatible with Java 6 bytecode (100% compatible)
➔ Integrate with existing Java frameworks
➔ No runtime overhead
➔ No cost to adopt
KDoc
➔ Dokka is the documentation engine for Kotlin.
Feature: Null safety out-of-the-box
val givenName: String? = null
val len = givenName?.length //assign null
val len = givenName!!.length //assert null
Feature: Lean syntax (no get/set)
data class Book(var title: String, var author: Author)
val book = Book(“Kotlin at JavaOne”,”Leonardo”)
println(book.title)
Feature: Smart casts and type inference
if (node is Leaf) {
return node.symbol;
}
val myString = "Some text"
Functional programming
val numbers = arrayListOf(-42, 17, 13, -9, 12)
val nonNegative = numbers.filter { it >= 0 }
Easy singletons
object CardFactory {
fun getCard(): Card {
return Card();
}
}
Default arguments
class NutritionFacts(val foodName: String,
val calories: Int,
val protein: Int = 0,
val carbohydrates: Int = 0) {
}
Named arguments
val burger = NutritionFacts("Hamburger", calories = 541,
protein = 14)
val rice = NutritionFacts("Rice", calories = 312,
carbohydrates = 23)
Extension functions
fun Activity.toast(message: CharSequence, duration: Int =
Toast.LENGTH_SHORT) {
Toast.makeText(this, message, duration).show()
}
REPL
➔ Read-eval-print-loop
Other features
➔ Exceptions are all unchecked
➔ Easy to use builder pattern (copy)
➔ Operator overloading (==, +, -, !, etc.)
➔ Better generics syntax (no wildcards)
➔ Automatic delegation pattern syntax
➔ String interpolation (idioms)
➔ KAPT (Kotlin annotation processor)
➔ What about multi-threading, etc? It’s all in Java!
Comparison w/ other emergent (flame war)
➔ Node.js
◆ No support to Java ecosystem
◆ Java is way faster than Node.js
➔ Go
◆ Statically linked (no VM)
◆ No support to Java ecosystem
◆ JVM is faster than Go
What’s the catch?
➔ Data class can’t inherit or be inherited
➔ Classes are final by default (you need to open)
➔ Compilation is incremental only in IDEA and Gradle
➔ Lack some FP functions (can use funKTionale lib)
➔ Null safety checks could be trick in the beginning
➔ Some reserved words conflicts (Mockito*)
Roadmap
➔ async/await/yield
➔ Data class hierarchy support
➔ Type aliases
➔ Bound method references
➔ Take advantage of Java 7/8 bytecode enhancements
➔ Back to work on JavaScript support
DEMO

Mais conteúdo relacionado

Mais procurados

Working with Shared Libraries in Perl
Working with Shared Libraries in PerlWorking with Shared Libraries in Perl
Working with Shared Libraries in PerlIdo Kanner
 
Apache Avro in LivePerson [Hebrew]
Apache Avro in LivePerson [Hebrew]Apache Avro in LivePerson [Hebrew]
Apache Avro in LivePerson [Hebrew]LivePerson
 
Taking Kotlin to production, Seriously
Taking Kotlin to production, SeriouslyTaking Kotlin to production, Seriously
Taking Kotlin to production, SeriouslyHaim Yadid
 
Getting Started with Go
Getting Started with GoGetting Started with Go
Getting Started with GoSteven Francia
 
2017: Kotlin - now more than ever
2017: Kotlin - now more than ever2017: Kotlin - now more than ever
2017: Kotlin - now more than everKai Koenig
 
Introduction to Google's Go programming language
Introduction to Google's Go programming languageIntroduction to Google's Go programming language
Introduction to Google's Go programming languageMario Castro Contreras
 
Apache Avro and Messaging at Scale in LivePerson
Apache Avro and Messaging at Scale in LivePersonApache Avro and Messaging at Scale in LivePerson
Apache Avro and Messaging at Scale in LivePersonLivePerson
 
HelsinkiJS - Clojurescript for Javascript Developers
HelsinkiJS - Clojurescript for Javascript DevelopersHelsinkiJS - Clojurescript for Javascript Developers
HelsinkiJS - Clojurescript for Javascript DevelopersJuho Teperi
 
Balisage - EXPath Packaging
Balisage - EXPath PackagingBalisage - EXPath Packaging
Balisage - EXPath PackagingFlorent Georges
 
What’s new in Kotlin?
What’s new in Kotlin?What’s new in Kotlin?
What’s new in Kotlin?Squareboat
 
アジャイルな開発をチームで やってみた(2010年版) - PHP Matsuri編
アジャイルな開発をチームで やってみた(2010年版) - PHP Matsuri編アジャイルな開発をチームで やってみた(2010年版) - PHP Matsuri編
アジャイルな開発をチームで やってみた(2010年版) - PHP Matsuri編Hiroki Ohtsuka
 
Avro - More Than Just a Serialization Framework - CHUG - 20120416
Avro - More Than Just a Serialization Framework - CHUG - 20120416Avro - More Than Just a Serialization Framework - CHUG - 20120416
Avro - More Than Just a Serialization Framework - CHUG - 20120416Chicago Hadoop Users Group
 

Mais procurados (19)

Working with Shared Libraries in Perl
Working with Shared Libraries in PerlWorking with Shared Libraries in Perl
Working with Shared Libraries in Perl
 
Apache Avro in LivePerson [Hebrew]
Apache Avro in LivePerson [Hebrew]Apache Avro in LivePerson [Hebrew]
Apache Avro in LivePerson [Hebrew]
 
Taking Kotlin to production, Seriously
Taking Kotlin to production, SeriouslyTaking Kotlin to production, Seriously
Taking Kotlin to production, Seriously
 
Fall in love with Kotlin
Fall in love with KotlinFall in love with Kotlin
Fall in love with Kotlin
 
Getting Started with Go
Getting Started with GoGetting Started with Go
Getting Started with Go
 
2017: Kotlin - now more than ever
2017: Kotlin - now more than ever2017: Kotlin - now more than ever
2017: Kotlin - now more than ever
 
Introduction to Google's Go programming language
Introduction to Google's Go programming languageIntroduction to Google's Go programming language
Introduction to Google's Go programming language
 
Apache Avro and Messaging at Scale in LivePerson
Apache Avro and Messaging at Scale in LivePersonApache Avro and Messaging at Scale in LivePerson
Apache Avro and Messaging at Scale in LivePerson
 
Python Introduction
Python IntroductionPython Introduction
Python Introduction
 
ApacheCon09: Avro
ApacheCon09: AvroApacheCon09: Avro
ApacheCon09: Avro
 
Kotlin from-scratch
Kotlin from-scratchKotlin from-scratch
Kotlin from-scratch
 
HelsinkiJS - Clojurescript for Javascript Developers
HelsinkiJS - Clojurescript for Javascript DevelopersHelsinkiJS - Clojurescript for Javascript Developers
HelsinkiJS - Clojurescript for Javascript Developers
 
Balisage - EXPath Packaging
Balisage - EXPath PackagingBalisage - EXPath Packaging
Balisage - EXPath Packaging
 
Php
PhpPhp
Php
 
What’s new in Kotlin?
What’s new in Kotlin?What’s new in Kotlin?
What’s new in Kotlin?
 
アジャイルな開発をチームで やってみた(2010年版) - PHP Matsuri編
アジャイルな開発をチームで やってみた(2010年版) - PHP Matsuri編アジャイルな開発をチームで やってみた(2010年版) - PHP Matsuri編
アジャイルな開発をチームで やってみた(2010年版) - PHP Matsuri編
 
Coding in kotlin
Coding in kotlinCoding in kotlin
Coding in kotlin
 
Avro - More Than Just a Serialization Framework - CHUG - 20120416
Avro - More Than Just a Serialization Framework - CHUG - 20120416Avro - More Than Just a Serialization Framework - CHUG - 20120416
Avro - More Than Just a Serialization Framework - CHUG - 20120416
 
Google Protocol Buffers
Google Protocol BuffersGoogle Protocol Buffers
Google Protocol Buffers
 

Destaque

TDC 2014 - Arquitetura front-end com AngularJS
TDC 2014 - Arquitetura front-end com AngularJSTDC 2014 - Arquitetura front-end com AngularJS
TDC 2014 - Arquitetura front-end com AngularJSLeonardo Zanivan
 
NetBeans Day 2015 - Node.js, HTML5, JBoss Forge, and Other Awesome New NetBea...
NetBeans Day 2015 - Node.js, HTML5, JBoss Forge, and Other Awesome New NetBea...NetBeans Day 2015 - Node.js, HTML5, JBoss Forge, and Other Awesome New NetBea...
NetBeans Day 2015 - Node.js, HTML5, JBoss Forge, and Other Awesome New NetBea...Leonardo Zanivan
 
TDC 2016 - Rodando JavaScript Server com Wildfly
TDC 2016 - Rodando JavaScript Server com WildflyTDC 2016 - Rodando JavaScript Server com Wildfly
TDC 2016 - Rodando JavaScript Server com WildflyLeonardo Zanivan
 
NetBeans Day 2016 - Getting the best of NetBeans IDE
NetBeans Day 2016 - Getting the best of NetBeans IDENetBeans Day 2016 - Getting the best of NetBeans IDE
NetBeans Day 2016 - Getting the best of NetBeans IDELeonardo Zanivan
 
JavaOne 2014 - Scalable JavaScript Applications with Project Nashorn [CON6423]
JavaOne 2014 - Scalable JavaScript Applications with Project Nashorn [CON6423]JavaOne 2014 - Scalable JavaScript Applications with Project Nashorn [CON6423]
JavaOne 2014 - Scalable JavaScript Applications with Project Nashorn [CON6423]Leonardo Zanivan
 
O papel e a carreira do arquiteto de software
O papel e a carreira do arquiteto de softwareO papel e a carreira do arquiteto de software
O papel e a carreira do arquiteto de softwareLeonardo Zanivan
 
TDC 2016 - Simplificando a segurança de sua aplicação com Java EE
TDC 2016 - Simplificando a segurança de sua aplicação com Java EETDC 2016 - Simplificando a segurança de sua aplicação com Java EE
TDC 2016 - Simplificando a segurança de sua aplicação com Java EELeonardo Zanivan
 
React e reactividade Meetup Facebook Developer Circles
React e reactividade Meetup Facebook Developer CirclesReact e reactividade Meetup Facebook Developer Circles
React e reactividade Meetup Facebook Developer CirclesJosé Barbosa
 
JavaOne 2015 - Simplificando a segurança de sua aplicação com Java EE
JavaOne 2015 - Simplificando a segurança de sua aplicação com Java EEJavaOne 2015 - Simplificando a segurança de sua aplicação com Java EE
JavaOne 2015 - Simplificando a segurança de sua aplicação com Java EELeonardo Zanivan
 
Знакомьтесь, Kotlin
Знакомьтесь, KotlinЗнакомьтесь, Kotlin
Знакомьтесь, KotlinTech Talks @NSU
 
Android opetuksessa 11.9.14
Android opetuksessa 11.9.14Android opetuksessa 11.9.14
Android opetuksessa 11.9.14Matleena Laakso
 
20140531 serebryany lecture01_fantastic_cpp_bugs
20140531 serebryany lecture01_fantastic_cpp_bugs20140531 serebryany lecture01_fantastic_cpp_bugs
20140531 serebryany lecture01_fantastic_cpp_bugsComputer Science Club
 
React + Flux (Alt)
React + Flux (Alt)React + Flux (Alt)
React + Flux (Alt)Cezar Luiz
 
Infinum Android Talks #20 - Benefits of using Kotlin
Infinum Android Talks #20 - Benefits of using KotlinInfinum Android Talks #20 - Benefits of using Kotlin
Infinum Android Talks #20 - Benefits of using KotlinInfinum
 

Destaque (20)

TDC 2014 - Arquitetura front-end com AngularJS
TDC 2014 - Arquitetura front-end com AngularJSTDC 2014 - Arquitetura front-end com AngularJS
TDC 2014 - Arquitetura front-end com AngularJS
 
NetBeans Day 2015 - Node.js, HTML5, JBoss Forge, and Other Awesome New NetBea...
NetBeans Day 2015 - Node.js, HTML5, JBoss Forge, and Other Awesome New NetBea...NetBeans Day 2015 - Node.js, HTML5, JBoss Forge, and Other Awesome New NetBea...
NetBeans Day 2015 - Node.js, HTML5, JBoss Forge, and Other Awesome New NetBea...
 
TDC 2016 - Rodando JavaScript Server com Wildfly
TDC 2016 - Rodando JavaScript Server com WildflyTDC 2016 - Rodando JavaScript Server com Wildfly
TDC 2016 - Rodando JavaScript Server com Wildfly
 
NetBeans Day 2016 - Getting the best of NetBeans IDE
NetBeans Day 2016 - Getting the best of NetBeans IDENetBeans Day 2016 - Getting the best of NetBeans IDE
NetBeans Day 2016 - Getting the best of NetBeans IDE
 
JavaOne 2014 - Scalable JavaScript Applications with Project Nashorn [CON6423]
JavaOne 2014 - Scalable JavaScript Applications with Project Nashorn [CON6423]JavaOne 2014 - Scalable JavaScript Applications with Project Nashorn [CON6423]
JavaOne 2014 - Scalable JavaScript Applications with Project Nashorn [CON6423]
 
O papel e a carreira do arquiteto de software
O papel e a carreira do arquiteto de softwareO papel e a carreira do arquiteto de software
O papel e a carreira do arquiteto de software
 
TDC 2016 - Simplificando a segurança de sua aplicação com Java EE
TDC 2016 - Simplificando a segurança de sua aplicação com Java EETDC 2016 - Simplificando a segurança de sua aplicação com Java EE
TDC 2016 - Simplificando a segurança de sua aplicação com Java EE
 
Curso Android Básico
Curso Android BásicoCurso Android Básico
Curso Android Básico
 
React e reactividade Meetup Facebook Developer Circles
React e reactividade Meetup Facebook Developer CirclesReact e reactividade Meetup Facebook Developer Circles
React e reactividade Meetup Facebook Developer Circles
 
Curso de ReactJS
Curso de ReactJSCurso de ReactJS
Curso de ReactJS
 
JavaOne 2015 - Simplificando a segurança de sua aplicação com Java EE
JavaOne 2015 - Simplificando a segurança de sua aplicação com Java EEJavaOne 2015 - Simplificando a segurança de sua aplicação com Java EE
JavaOne 2015 - Simplificando a segurança de sua aplicação com Java EE
 
Scala Day by Day
Scala Day by DayScala Day by Day
Scala Day by Day
 
Знакомьтесь, Kotlin
Знакомьтесь, KotlinЗнакомьтесь, Kotlin
Знакомьтесь, Kotlin
 
Scala
ScalaScala
Scala
 
Android opetuksessa 11.9.14
Android opetuksessa 11.9.14Android opetuksessa 11.9.14
Android opetuksessa 11.9.14
 
20140531 serebryany lecture01_fantastic_cpp_bugs
20140531 serebryany lecture01_fantastic_cpp_bugs20140531 serebryany lecture01_fantastic_cpp_bugs
20140531 serebryany lecture01_fantastic_cpp_bugs
 
React + Flux (Alt)
React + Flux (Alt)React + Flux (Alt)
React + Flux (Alt)
 
Kotlin Overview
Kotlin OverviewKotlin Overview
Kotlin Overview
 
Intro to kotlin
Intro to kotlinIntro to kotlin
Intro to kotlin
 
Infinum Android Talks #20 - Benefits of using Kotlin
Infinum Android Talks #20 - Benefits of using KotlinInfinum Android Talks #20 - Benefits of using Kotlin
Infinum Android Talks #20 - Benefits of using Kotlin
 

Semelhante a JavaOne 2016 - Kotlin: The Language of The Future For JVM?

Kotlin for Android Development
Kotlin for Android DevelopmentKotlin for Android Development
Kotlin for Android DevelopmentSpeck&Tech
 
Kotlin for Android Developers - 1
Kotlin for Android Developers - 1Kotlin for Android Developers - 1
Kotlin for Android Developers - 1Mohamed Nabil, MSc.
 
Scala and jvm_languages_praveen_technologist
Scala and jvm_languages_praveen_technologistScala and jvm_languages_praveen_technologist
Scala and jvm_languages_praveen_technologistpmanvi
 
A quick and fast intro to Kotlin
A quick and fast intro to Kotlin A quick and fast intro to Kotlin
A quick and fast intro to Kotlin XPeppers
 
Dart the Better JavaScript
Dart the Better JavaScriptDart the Better JavaScript
Dart the Better JavaScriptJorg Janke
 
Develop realtime web with Scala and Xitrum
Develop realtime web with Scala and XitrumDevelop realtime web with Scala and Xitrum
Develop realtime web with Scala and XitrumNgoc Dao
 
Scalable and Flexible Machine Learning With Scala @ LinkedIn
Scalable and Flexible Machine Learning With Scala @ LinkedInScalable and Flexible Machine Learning With Scala @ LinkedIn
Scalable and Flexible Machine Learning With Scala @ LinkedInVitaly Gordon
 
Golang workshop - Mindbowser
Golang workshop - MindbowserGolang workshop - Mindbowser
Golang workshop - MindbowserMindbowser Inc
 
Android 101 - Kotlin ( Future of Android Development)
Android 101 - Kotlin ( Future of Android Development)Android 101 - Kotlin ( Future of Android Development)
Android 101 - Kotlin ( Future of Android Development)Hassan Abid
 
Java Basics
Java BasicsJava Basics
Java BasicsSunil OS
 
"Xapi-lang For declarative code generation" By James Nelson
"Xapi-lang For declarative code generation" By James Nelson"Xapi-lang For declarative code generation" By James Nelson
"Xapi-lang For declarative code generation" By James NelsonGWTcon
 
BCS SPA 2010 - An Introduction to Scala for Java Developers
BCS SPA 2010 - An Introduction to Scala for Java DevelopersBCS SPA 2010 - An Introduction to Scala for Java Developers
BCS SPA 2010 - An Introduction to Scala for Java DevelopersMiles Sabin
 
An Introduction to Scala for Java Developers
An Introduction to Scala for Java DevelopersAn Introduction to Scala for Java Developers
An Introduction to Scala for Java DevelopersMiles Sabin
 
Poniendo Kotlin en producción a palos (Kotlin in production, the hard way)
Poniendo Kotlin en producción a palos (Kotlin in production, the hard way)Poniendo Kotlin en producción a palos (Kotlin in production, the hard way)
Poniendo Kotlin en producción a palos (Kotlin in production, the hard way)Andrés Viedma Peláez
 
PySpark with Juypter
PySpark with JuypterPySpark with Juypter
PySpark with JuypterLi Ming Tsai
 
Go from a PHP Perspective
Go from a PHP PerspectiveGo from a PHP Perspective
Go from a PHP PerspectiveBarry Jones
 
Everything-as-code. A polyglot journey.
Everything-as-code. A polyglot journey.Everything-as-code. A polyglot journey.
Everything-as-code. A polyglot journey.Mario-Leander Reimer
 
Everything-as-code - a polyglot journey.
Everything-as-code - a polyglot journey.Everything-as-code - a polyglot journey.
Everything-as-code - a polyglot journey.QAware GmbH
 

Semelhante a JavaOne 2016 - Kotlin: The Language of The Future For JVM? (20)

Kotlin for Android Development
Kotlin for Android DevelopmentKotlin for Android Development
Kotlin for Android Development
 
Kotlin for Android Developers - 1
Kotlin for Android Developers - 1Kotlin for Android Developers - 1
Kotlin for Android Developers - 1
 
Scala and jvm_languages_praveen_technologist
Scala and jvm_languages_praveen_technologistScala and jvm_languages_praveen_technologist
Scala and jvm_languages_praveen_technologist
 
A quick and fast intro to Kotlin
A quick and fast intro to Kotlin A quick and fast intro to Kotlin
A quick and fast intro to Kotlin
 
Dart the Better JavaScript
Dart the Better JavaScriptDart the Better JavaScript
Dart the Better JavaScript
 
Develop realtime web with Scala and Xitrum
Develop realtime web with Scala and XitrumDevelop realtime web with Scala and Xitrum
Develop realtime web with Scala and Xitrum
 
Scalable and Flexible Machine Learning With Scala @ LinkedIn
Scalable and Flexible Machine Learning With Scala @ LinkedInScalable and Flexible Machine Learning With Scala @ LinkedIn
Scalable and Flexible Machine Learning With Scala @ LinkedIn
 
Golang workshop - Mindbowser
Golang workshop - MindbowserGolang workshop - Mindbowser
Golang workshop - Mindbowser
 
Android 101 - Kotlin ( Future of Android Development)
Android 101 - Kotlin ( Future of Android Development)Android 101 - Kotlin ( Future of Android Development)
Android 101 - Kotlin ( Future of Android Development)
 
Java Basics
Java BasicsJava Basics
Java Basics
 
"Xapi-lang For declarative code generation" By James Nelson
"Xapi-lang For declarative code generation" By James Nelson"Xapi-lang For declarative code generation" By James Nelson
"Xapi-lang For declarative code generation" By James Nelson
 
BCS SPA 2010 - An Introduction to Scala for Java Developers
BCS SPA 2010 - An Introduction to Scala for Java DevelopersBCS SPA 2010 - An Introduction to Scala for Java Developers
BCS SPA 2010 - An Introduction to Scala for Java Developers
 
An Introduction to Scala for Java Developers
An Introduction to Scala for Java DevelopersAn Introduction to Scala for Java Developers
An Introduction to Scala for Java Developers
 
Poniendo Kotlin en producción a palos (Kotlin in production, the hard way)
Poniendo Kotlin en producción a palos (Kotlin in production, the hard way)Poniendo Kotlin en producción a palos (Kotlin in production, the hard way)
Poniendo Kotlin en producción a palos (Kotlin in production, the hard way)
 
PySpark with Juypter
PySpark with JuypterPySpark with Juypter
PySpark with Juypter
 
Go from a PHP Perspective
Go from a PHP PerspectiveGo from a PHP Perspective
Go from a PHP Perspective
 
Everything-as-code. A polyglot journey.
Everything-as-code. A polyglot journey.Everything-as-code. A polyglot journey.
Everything-as-code. A polyglot journey.
 
Everything-as-code - a polyglot journey.
Everything-as-code - a polyglot journey.Everything-as-code - a polyglot journey.
Everything-as-code - a polyglot journey.
 
Scala ntnu
Scala ntnuScala ntnu
Scala ntnu
 
Exploring Kotlin
Exploring KotlinExploring Kotlin
Exploring Kotlin
 

Último

GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationMichael W. Hawkins
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...apidays
 
HTML Injection Attacks: Impact and Mitigation Strategies
HTML Injection Attacks: Impact and Mitigation StrategiesHTML Injection Attacks: Impact and Mitigation Strategies
HTML Injection Attacks: Impact and Mitigation StrategiesBoston Institute of Analytics
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024The Digital Insurer
 
Advantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your BusinessAdvantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your BusinessPixlogix Infotech
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonAnna Loughnan Colquhoun
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationSafe Software
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...Martijn de Jong
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsMaria Levchenko
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)Gabriella Davis
 
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...apidays
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoffsammart93
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfsudhanshuwaghmare1
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUK Journal
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationRadu Cotescu
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)wesley chun
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerThousandEyes
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsJoaquim Jorge
 

Último (20)

GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
 
HTML Injection Attacks: Impact and Mitigation Strategies
HTML Injection Attacks: Impact and Mitigation StrategiesHTML Injection Attacks: Impact and Mitigation Strategies
HTML Injection Attacks: Impact and Mitigation Strategies
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024
 
Advantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your BusinessAdvantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your Business
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed texts
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
 

JavaOne 2016 - Kotlin: The Language of The Future For JVM?

  • 1. Kotlin: The Language of The Future For JVM? Leonardo Zanivan @ JavaOne Latin America 2016 [SES12196]
  • 2. Who am I? ➔ Leonardo Zanivan ◆ Software Architect ◆ OSS Contributor ◆ GUJavaSC Member ◆ JCP Member
  • 3. First things first ➔ Why Kotlin? ◆ Concise ◆ Safe ◆ Versatile ◆ Interoperabile ◆ Tooling
  • 4. First things first ➔ History ◆ Conceived in 2010 ◆ Language and compiler are open source (Apache 2) ◆ To be a modern industry standard language ◆ With static typing and a smooth migration path
  • 5. First things first ➔ Why should I care? ◆ Enterprise class support ◆ Production ready ◆ Java #1 language ◆ Productivity
  • 6. First things first ➔ Who is using? ◆ GMC ◆ Expedia ◆ Prezi.com ◆ Telegram ◆ 99 Taxis ◆ JetBrains (IDEA, YouTrack, TeamCity)
  • 7. Easy to learn ➔ Extensive documentation ◆ Online reference http://kotlinlang.org/docs ◆ Online editor & training http://try.kotlinlang.org ◆ Language documentation (PDF with 153 pages) ◆ Books (Kotlin in Action and Kotlin for Android) ◆ GitHub and StackOverflow activity
  • 8. Easy to learn ➔ Fast startup ◆ Intuitive, easy to read & write (opposed to Scala) ◆ No force Functional or OOP styling
  • 9. Easy to learn Online editor & training http://try.kotlinlang.org
  • 10. Easy to use ➔ Tooling support ◆ IDEA Community & Ultimate ◆ Android Studio ◆ Eclipse ◆ Maven / Ant / Gradle ◆ NetBeans plugin (experimental) ◆ Sonar plugin (experimental)
  • 11. Multi target support ➔ Java ➔ Android * ➔ JavaScript (experimental)
  • 12. Easy to migrate ➔ Mix Java and Kotlin source files in the same project ➔ Java to Kotlin source conversion tool ➔ Compatible with Java 6 bytecode (100% compatible) ➔ Integrate with existing Java frameworks ➔ No runtime overhead ➔ No cost to adopt
  • 13. KDoc ➔ Dokka is the documentation engine for Kotlin.
  • 14. Feature: Null safety out-of-the-box val givenName: String? = null val len = givenName?.length //assign null val len = givenName!!.length //assert null
  • 15. Feature: Lean syntax (no get/set) data class Book(var title: String, var author: Author) val book = Book(“Kotlin at JavaOne”,”Leonardo”) println(book.title)
  • 16. Feature: Smart casts and type inference if (node is Leaf) { return node.symbol; } val myString = "Some text"
  • 17. Functional programming val numbers = arrayListOf(-42, 17, 13, -9, 12) val nonNegative = numbers.filter { it >= 0 }
  • 18. Easy singletons object CardFactory { fun getCard(): Card { return Card(); } }
  • 19. Default arguments class NutritionFacts(val foodName: String, val calories: Int, val protein: Int = 0, val carbohydrates: Int = 0) { }
  • 20. Named arguments val burger = NutritionFacts("Hamburger", calories = 541, protein = 14) val rice = NutritionFacts("Rice", calories = 312, carbohydrates = 23)
  • 21. Extension functions fun Activity.toast(message: CharSequence, duration: Int = Toast.LENGTH_SHORT) { Toast.makeText(this, message, duration).show() }
  • 23. Other features ➔ Exceptions are all unchecked ➔ Easy to use builder pattern (copy) ➔ Operator overloading (==, +, -, !, etc.) ➔ Better generics syntax (no wildcards) ➔ Automatic delegation pattern syntax ➔ String interpolation (idioms) ➔ KAPT (Kotlin annotation processor) ➔ What about multi-threading, etc? It’s all in Java!
  • 24. Comparison w/ other emergent (flame war) ➔ Node.js ◆ No support to Java ecosystem ◆ Java is way faster than Node.js ➔ Go ◆ Statically linked (no VM) ◆ No support to Java ecosystem ◆ JVM is faster than Go
  • 25. What’s the catch? ➔ Data class can’t inherit or be inherited ➔ Classes are final by default (you need to open) ➔ Compilation is incremental only in IDEA and Gradle ➔ Lack some FP functions (can use funKTionale lib) ➔ Null safety checks could be trick in the beginning ➔ Some reserved words conflicts (Mockito*)
  • 26. Roadmap ➔ async/await/yield ➔ Data class hierarchy support ➔ Type aliases ➔ Bound method references ➔ Take advantage of Java 7/8 bytecode enhancements ➔ Back to work on JavaScript support
  • 27. DEMO