SlideShare a Scribd company logo
Statically typed programming language
for the JVM, Android and the browser
100% interoperable with Java™
PaymentRobot payment = new PaymentRobot();
ResultRobot result = payment
.amount(42_00)
.recipient("foo@bar.com")
.send();
result.isSuccess();
val payment = PaymentRobot()
val result = payment
.amount(4200)
.recipient("foo@bar.com")
.send()
result.isSuccess()
val result = payment {
amount(4200)
recipient("foo@bar.com")
}.send()
result.isSuccess()
payment {
amount(4200)
recipient("foo@bar.com")
}.send {
isSuccess()
}
payment {
amount(4200)
recipient("foo@bar.com")
} send {
isSuccess()
}
payment {
amount(4200)
recipient("foo@bar.com")
send()
}
birthday {
date(1970, 1, 1)
next()
}
ssn {
value("123-56-7890")
next()
}
result {
isSuccess()
}
public String foo() {

...

}
// null or non-null?

String f = foo();
@NonNull
public String foo() {

...

}
// non-null

String f = foo();
// nullable

fun nullable(): String? {

...

}



// non-null

fun nonNull(): String {

...

}
// ok

val foo: String? = "foo"



// compile error

val bar: String = null
String foo = "foo";

String bar = "foo";

// isEquals: true
boolean isEquals = foo.equals(bar);
String foo = "foo";

String bar = "foo";



// isEquals: false
boolean isEquals = foo == bar;
val foo = "foo"

val bar = "bar"



// isEquals: true
val isEquals = foo == bar
// MyFunctions.kt



package com.sample.package



fun foo() { }
// OtherFunctions.kt

package com.sample.package.others

// import function foo()

import com.sample.package.foo



fun baz() {

foo()

}
public class MainActivity extends AppCompatActivity {



Button btnCalligraphy;



@Override

protected void onCreate(Bundle savedInstanceState) {

super.onCreate(savedInstanceState);

setContentView(R.layout.activity_main);



btnCalligraphy = (Button) findViewById(R.id.btn_calligraphy);



btnCalligraphy.setOnClickListener(new View.OnClickListener() {

@Override

public void onClick(View view) {

// Do something

}

});



}

}
class MainActivity : AppCompatActivity() {



override fun onCreate(savedInstanceState: Bundle?) {

super.onCreate(savedInstanceState)

setContentView(R.layout.activity_main)



btn_calligraphy.setOnClickListener {

// Do something

}

}

}
view.setOnClickListener(new View.OnClickListener() {

@Override

public void onClick(View v) {

Toast.makeText(
v.getContext().getApplicationContext(),

"Hello", Toast.LENGTH_SHORT).show();

}

});
view.setOnClickListener({ v ->



Toast.makeText(v.context.applicationContext,

"Hello", Toast.LENGTH_SHORT).show()



})
view.setOnClickListener { v ->



Toast.makeText(v.context.applicationContext,

"Hello", Toast.LENGTH_SHORT).show()



}
view.setOnClickListener {



Toast.makeText(it.context.applicationContext,

"Hello", Toast.LENGTH_SHORT).show()



}
val people : List<String> = ..


people.filter { it.startsWith('S') }

.filter { it.length < 10 }

.onEach { it.toUpperCase() }

.forEach { println(it) }
val people : List<String> = ..


people.filter { it.startsWith('S') }

.filter { it.length < 10 }

.onEach(String::toUpperCase)

.forEach(::println)
val people : List<String> = ..


people.stream()

.filter { it.startsWith('S') }

.filter { it.length < 10 }

.map(String::toUpperCase)

.forEach(::println)
var foo : String = "Foo"

foo = "FOO"



val bar : String = "Bar"

bar = "BAR"
var foo : String = "Foo"

foo = "FOO"



val bar : String = "Bar"

bar = "BAR"
Compile Error (val cannot be reassigned)
val mutableList : MutableList<String>
= mutableListOf(“foo", "bar", "baz")

mutableList.add("fizz")



val immutableList : List<String>
= listOf("foo", "bar", "baz")

immutableList.add("fizz")
val mutableList : MutableList<String>
= mutableListOf("foo", "bar", "baz")

mutableList.add("fizz")



val immutableList : List<String>
= listOf("foo", "bar", "baz")

immutableList.add("fizz")
Compile Error (val cannot be reassigned)
val emptyStringList = listOf<String>()



val cities = listOf("Seoul", "Busan")



val mutableCities = mutableListOf("Seoul, Busan")
val emptyStringSet = setOf<String>()



val cities = setOf("Seoul", "Busan")



val mutableCities = mutableSetOf("Seoul, Busan")
val pair : Pair<String, String> = Pair("Seoul", "서울")
val pair : Pair<String, String> = "Seoul" to "서울"
public class Person {



String name;



String address;



Person(String name, String address) {

this.name = name;

this.address = address;

}



public String getAddress() {

return address;

}



public void setAddress(String address) {

this.address = address;

}

}
public class Person {



String name;



String address;



Person(String name, String address) {

this.name = name;

this.address = address;

}



public String getAddress() {

return address;

}



public void setAddress(String address) {

this.address = address;

}



@Override

public boolean equals(Object o) {

if (this == o) {

return true;

}

if (o == null || getClass() != o.getClass()) {

return false;

}



Person person = (Person) o;



if (!name.equals(person.name)) {

return false;

}

return address != null ? address.equals(person.address) : person.address == null;



}



@Override

public int hashCode() {

int result = name.hashCode();

result = 31 * result + (address != null ? address.hashCode() : 0);

return result;

}



@Override

data class Person(val name: String, val address: String)
Toast.makeText(applicationContext,
"Hello, Kotlin!", Toast.LENGTH_SHORT).show()
// Define an extension function on Context
fun Context.toast(message: String) {

Toast.makeText(this.applicationContext,
message, Toast.LENGTH_SHORT).show()

}
// available in class Context and its descendants
toast("Hello, Kotlin!")
Happy Kotlin!

More Related Content

What's hot

The Ring programming language version 1.10 book - Part 52 of 212
The Ring programming language version 1.10 book - Part 52 of 212The Ring programming language version 1.10 book - Part 52 of 212
The Ring programming language version 1.10 book - Part 52 of 212
Mahmoud Samir Fayed
 
Intro to F#
Intro to F#Intro to F#
Intro to F#
Kristian Hellang
 
An Elephant of a Different Colour: Hack
An Elephant of a Different Colour: HackAn Elephant of a Different Colour: Hack
An Elephant of a Different Colour: Hack
Vic Metcalfe
 
Python Ireland Nov 2010 Talk: Unit Testing
Python Ireland Nov 2010 Talk: Unit TestingPython Ireland Nov 2010 Talk: Unit Testing
Python Ireland Nov 2010 Talk: Unit Testing
Python Ireland
 
JavaScript Code Formatting With Prettier by Christopher Chedeau
JavaScript Code Formatting With Prettier by Christopher ChedeauJavaScript Code Formatting With Prettier by Christopher Chedeau
JavaScript Code Formatting With Prettier by Christopher Chedeau
React London 2017
 
Super Advanced Python –act1
Super Advanced Python –act1Super Advanced Python –act1
Super Advanced Python –act1
Ke Wei Louis
 
The Ring programming language version 1.3 book - Part 14 of 88
The Ring programming language version 1.3 book - Part 14 of 88The Ring programming language version 1.3 book - Part 14 of 88
The Ring programming language version 1.3 book - Part 14 of 88
Mahmoud Samir Fayed
 
Effector: we need to go deeper
Effector: we need to go deeperEffector: we need to go deeper
Effector: we need to go deeper
Victor Didenko
 
Programming Lisp Clojure - 2장 : 클로저 둘러보기
Programming Lisp Clojure - 2장 : 클로저 둘러보기Programming Lisp Clojure - 2장 : 클로저 둘러보기
Programming Lisp Clojure - 2장 : 클로저 둘러보기
JangHyuk You
 
The Ring programming language version 1.5.2 book - Part 41 of 181
The Ring programming language version 1.5.2 book - Part 41 of 181The Ring programming language version 1.5.2 book - Part 41 of 181
The Ring programming language version 1.5.2 book - Part 41 of 181
Mahmoud Samir Fayed
 
Mongodb Aggregation Pipeline
Mongodb Aggregation PipelineMongodb Aggregation Pipeline
Mongodb Aggregation Pipeline
zahid-mian
 
大量地区化解决方案V5
大量地区化解决方案V5大量地区化解决方案V5
大量地区化解决方案V5
bqconf
 
Useful javascript
Useful javascriptUseful javascript
Useful javascriptLei Kang
 
HTML5 and CSS3 Refresher
HTML5 and CSS3 RefresherHTML5 and CSS3 Refresher
HTML5 and CSS3 Refresher
Ivano Malavolta
 
Table through php
Table through phpTable through php
Table through php
syeda zoya mehdi
 
Map/reduce, geospatial indexing, and other cool features (Kristina Chodorow)
Map/reduce, geospatial indexing, and other cool features (Kristina Chodorow)Map/reduce, geospatial indexing, and other cool features (Kristina Chodorow)
Map/reduce, geospatial indexing, and other cool features (Kristina Chodorow)MongoSF
 
Derping With Kotlin
Derping With KotlinDerping With Kotlin
Derping With Kotlin
Ross Tuck
 
Introduction to Go for Java Programmers
Introduction to Go for Java ProgrammersIntroduction to Go for Java Programmers
Introduction to Go for Java Programmers
Kalpa Pathum Welivitigoda
 
Using a mobile phone as a therapist - Superweek 2018
Using a mobile phone as a therapist - Superweek 2018Using a mobile phone as a therapist - Superweek 2018
Using a mobile phone as a therapist - Superweek 2018
Peter Meyer
 

What's hot (20)

The Ring programming language version 1.10 book - Part 52 of 212
The Ring programming language version 1.10 book - Part 52 of 212The Ring programming language version 1.10 book - Part 52 of 212
The Ring programming language version 1.10 book - Part 52 of 212
 
ProgrammingwithGOLang
ProgrammingwithGOLangProgrammingwithGOLang
ProgrammingwithGOLang
 
Intro to F#
Intro to F#Intro to F#
Intro to F#
 
An Elephant of a Different Colour: Hack
An Elephant of a Different Colour: HackAn Elephant of a Different Colour: Hack
An Elephant of a Different Colour: Hack
 
Python Ireland Nov 2010 Talk: Unit Testing
Python Ireland Nov 2010 Talk: Unit TestingPython Ireland Nov 2010 Talk: Unit Testing
Python Ireland Nov 2010 Talk: Unit Testing
 
JavaScript Code Formatting With Prettier by Christopher Chedeau
JavaScript Code Formatting With Prettier by Christopher ChedeauJavaScript Code Formatting With Prettier by Christopher Chedeau
JavaScript Code Formatting With Prettier by Christopher Chedeau
 
Super Advanced Python –act1
Super Advanced Python –act1Super Advanced Python –act1
Super Advanced Python –act1
 
The Ring programming language version 1.3 book - Part 14 of 88
The Ring programming language version 1.3 book - Part 14 of 88The Ring programming language version 1.3 book - Part 14 of 88
The Ring programming language version 1.3 book - Part 14 of 88
 
Effector: we need to go deeper
Effector: we need to go deeperEffector: we need to go deeper
Effector: we need to go deeper
 
Programming Lisp Clojure - 2장 : 클로저 둘러보기
Programming Lisp Clojure - 2장 : 클로저 둘러보기Programming Lisp Clojure - 2장 : 클로저 둘러보기
Programming Lisp Clojure - 2장 : 클로저 둘러보기
 
The Ring programming language version 1.5.2 book - Part 41 of 181
The Ring programming language version 1.5.2 book - Part 41 of 181The Ring programming language version 1.5.2 book - Part 41 of 181
The Ring programming language version 1.5.2 book - Part 41 of 181
 
Mongodb Aggregation Pipeline
Mongodb Aggregation PipelineMongodb Aggregation Pipeline
Mongodb Aggregation Pipeline
 
大量地区化解决方案V5
大量地区化解决方案V5大量地区化解决方案V5
大量地区化解决方案V5
 
Useful javascript
Useful javascriptUseful javascript
Useful javascript
 
HTML5 and CSS3 Refresher
HTML5 and CSS3 RefresherHTML5 and CSS3 Refresher
HTML5 and CSS3 Refresher
 
Table through php
Table through phpTable through php
Table through php
 
Map/reduce, geospatial indexing, and other cool features (Kristina Chodorow)
Map/reduce, geospatial indexing, and other cool features (Kristina Chodorow)Map/reduce, geospatial indexing, and other cool features (Kristina Chodorow)
Map/reduce, geospatial indexing, and other cool features (Kristina Chodorow)
 
Derping With Kotlin
Derping With KotlinDerping With Kotlin
Derping With Kotlin
 
Introduction to Go for Java Programmers
Introduction to Go for Java ProgrammersIntroduction to Go for Java Programmers
Introduction to Go for Java Programmers
 
Using a mobile phone as a therapist - Superweek 2018
Using a mobile phone as a therapist - Superweek 2018Using a mobile phone as a therapist - Superweek 2018
Using a mobile phone as a therapist - Superweek 2018
 

Similar to 레진코믹스가 코틀린으로 간 까닭은?

Kotlin Programming Language. What it is all about. Roman Belov, PMM in Kotlin
Kotlin Programming Language. What it is all about. Roman Belov, PMM in KotlinKotlin Programming Language. What it is all about. Roman Belov, PMM in Kotlin
Kotlin Programming Language. What it is all about. Roman Belov, PMM in Kotlin
JetBrains Russia
 
Miracle of std lib
Miracle of std libMiracle of std lib
Miracle of std lib
Jedsada Tiwongvokul
 
Pooya Khaloo Presentation on IWMC 2015
Pooya Khaloo Presentation on IWMC 2015Pooya Khaloo Presentation on IWMC 2015
Pooya Khaloo Presentation on IWMC 2015
Iran Entrepreneurship Association
 
A swift introduction to Swift
A swift introduction to SwiftA swift introduction to Swift
A swift introduction to Swift
Giordano Scalzo
 
Java/Scala Lab: Slava Schmidt - Introduction to Reactive Streams
Java/Scala Lab: Slava Schmidt - Introduction to Reactive StreamsJava/Scala Lab: Slava Schmidt - Introduction to Reactive Streams
Java/Scala Lab: Slava Schmidt - Introduction to Reactive Streams
GeeksLab Odessa
 
Error Handling with the Result Monad
Error Handling with the Result MonadError Handling with the Result Monad
Error Handling with the Result Monad
istefo
 
Kotlin Basics - Apalon Kotlin Sprint Part 2
Kotlin Basics - Apalon Kotlin Sprint Part 2Kotlin Basics - Apalon Kotlin Sprint Part 2
Kotlin Basics - Apalon Kotlin Sprint Part 2
Kirill Rozov
 
Kotlin, why?
Kotlin, why?Kotlin, why?
Kotlin, why?
Paweł Byszewski
 
Swift - 혼자 공부하면 분명히 안할테니까 같이 공부하기
Swift - 혼자 공부하면 분명히 안할테니까 같이 공부하기Swift - 혼자 공부하면 분명히 안할테니까 같이 공부하기
Swift - 혼자 공부하면 분명히 안할테니까 같이 공부하기
Suyeol Jeon
 
Benefits of Kotlin
Benefits of KotlinBenefits of Kotlin
Benefits of Kotlin
Benjamin Waye
 
ddd+scala
ddd+scaladdd+scala
ddd+scala
潤一 加藤
 
Kotlin : Advanced Tricks - Ubiratan Soares
Kotlin : Advanced Tricks - Ubiratan SoaresKotlin : Advanced Tricks - Ubiratan Soares
Kotlin : Advanced Tricks - Ubiratan Soares
iMasters
 
An Introduction to Scala (2014)
An Introduction to Scala (2014)An Introduction to Scala (2014)
An Introduction to Scala (2014)
William Narmontas
 
JavaFX 2.0 With Alternative Languages - JavaOne 2011
JavaFX 2.0 With Alternative Languages - JavaOne 2011JavaFX 2.0 With Alternative Languages - JavaOne 2011
JavaFX 2.0 With Alternative Languages - JavaOne 2011
Stephen Chin
 
PHP 7 – What changed internally?
PHP 7 – What changed internally?PHP 7 – What changed internally?
PHP 7 – What changed internally?
Nikita Popov
 
かとうの Kotlin 講座 こってり版
かとうの Kotlin 講座 こってり版かとうの Kotlin 講座 こってり版
かとうの Kotlin 講座 こってり版
Yutaka Kato
 
Introduction to Swift programming language.
Introduction to Swift programming language.Introduction to Swift programming language.
Introduction to Swift programming language.
Icalia Labs
 

Similar to 레진코믹스가 코틀린으로 간 까닭은? (17)

Kotlin Programming Language. What it is all about. Roman Belov, PMM in Kotlin
Kotlin Programming Language. What it is all about. Roman Belov, PMM in KotlinKotlin Programming Language. What it is all about. Roman Belov, PMM in Kotlin
Kotlin Programming Language. What it is all about. Roman Belov, PMM in Kotlin
 
Miracle of std lib
Miracle of std libMiracle of std lib
Miracle of std lib
 
Pooya Khaloo Presentation on IWMC 2015
Pooya Khaloo Presentation on IWMC 2015Pooya Khaloo Presentation on IWMC 2015
Pooya Khaloo Presentation on IWMC 2015
 
A swift introduction to Swift
A swift introduction to SwiftA swift introduction to Swift
A swift introduction to Swift
 
Java/Scala Lab: Slava Schmidt - Introduction to Reactive Streams
Java/Scala Lab: Slava Schmidt - Introduction to Reactive StreamsJava/Scala Lab: Slava Schmidt - Introduction to Reactive Streams
Java/Scala Lab: Slava Schmidt - Introduction to Reactive Streams
 
Error Handling with the Result Monad
Error Handling with the Result MonadError Handling with the Result Monad
Error Handling with the Result Monad
 
Kotlin Basics - Apalon Kotlin Sprint Part 2
Kotlin Basics - Apalon Kotlin Sprint Part 2Kotlin Basics - Apalon Kotlin Sprint Part 2
Kotlin Basics - Apalon Kotlin Sprint Part 2
 
Kotlin, why?
Kotlin, why?Kotlin, why?
Kotlin, why?
 
Swift - 혼자 공부하면 분명히 안할테니까 같이 공부하기
Swift - 혼자 공부하면 분명히 안할테니까 같이 공부하기Swift - 혼자 공부하면 분명히 안할테니까 같이 공부하기
Swift - 혼자 공부하면 분명히 안할테니까 같이 공부하기
 
Benefits of Kotlin
Benefits of KotlinBenefits of Kotlin
Benefits of Kotlin
 
ddd+scala
ddd+scaladdd+scala
ddd+scala
 
Kotlin : Advanced Tricks - Ubiratan Soares
Kotlin : Advanced Tricks - Ubiratan SoaresKotlin : Advanced Tricks - Ubiratan Soares
Kotlin : Advanced Tricks - Ubiratan Soares
 
An Introduction to Scala (2014)
An Introduction to Scala (2014)An Introduction to Scala (2014)
An Introduction to Scala (2014)
 
JavaFX 2.0 With Alternative Languages - JavaOne 2011
JavaFX 2.0 With Alternative Languages - JavaOne 2011JavaFX 2.0 With Alternative Languages - JavaOne 2011
JavaFX 2.0 With Alternative Languages - JavaOne 2011
 
PHP 7 – What changed internally?
PHP 7 – What changed internally?PHP 7 – What changed internally?
PHP 7 – What changed internally?
 
かとうの Kotlin 講座 こってり版
かとうの Kotlin 講座 こってり版かとうの Kotlin 講座 こってり版
かとうの Kotlin 講座 こってり版
 
Introduction to Swift programming language.
Introduction to Swift programming language.Introduction to Swift programming language.
Introduction to Swift programming language.
 

More from Taeho Kim

RxJava in Action
RxJava in ActionRxJava in Action
RxJava in Action
Taeho Kim
 
Android Studio 2.2 - What's new in Android development tools
Android Studio 2.2 - What's new in Android development toolsAndroid Studio 2.2 - What's new in Android development tools
Android Studio 2.2 - What's new in Android development tools
Taeho Kim
 
Multi Window in Android N
Multi Window in Android NMulti Window in Android N
Multi Window in Android N
Taeho Kim
 
Material Design with Support Design Library
Material Design with Support Design LibraryMaterial Design with Support Design Library
Material Design with Support Design Library
Taeho Kim
 
Support Design Library
Support Design LibrarySupport Design Library
Support Design Library
Taeho Kim
 
Material design for everyone
Material design for everyoneMaterial design for everyone
Material design for everyone
Taeho Kim
 
Notifications for Android L & wear
Notifications for Android L & wearNotifications for Android L & wear
Notifications for Android L & wear
Taeho Kim
 
[Hello World 천안아산] 안드로이드 입문
[Hello World 천안아산] 안드로이드 입문[Hello World 천안아산] 안드로이드 입문
[Hello World 천안아산] 안드로이드 입문
Taeho Kim
 

More from Taeho Kim (8)

RxJava in Action
RxJava in ActionRxJava in Action
RxJava in Action
 
Android Studio 2.2 - What's new in Android development tools
Android Studio 2.2 - What's new in Android development toolsAndroid Studio 2.2 - What's new in Android development tools
Android Studio 2.2 - What's new in Android development tools
 
Multi Window in Android N
Multi Window in Android NMulti Window in Android N
Multi Window in Android N
 
Material Design with Support Design Library
Material Design with Support Design LibraryMaterial Design with Support Design Library
Material Design with Support Design Library
 
Support Design Library
Support Design LibrarySupport Design Library
Support Design Library
 
Material design for everyone
Material design for everyoneMaterial design for everyone
Material design for everyone
 
Notifications for Android L & wear
Notifications for Android L & wearNotifications for Android L & wear
Notifications for Android L & wear
 
[Hello World 천안아산] 안드로이드 입문
[Hello World 천안아산] 안드로이드 입문[Hello World 천안아산] 안드로이드 입문
[Hello World 천안아산] 안드로이드 입문
 

Recently uploaded

RISE with SAP and Journey to the Intelligent Enterprise
RISE with SAP and Journey to the Intelligent EnterpriseRISE with SAP and Journey to the Intelligent Enterprise
RISE with SAP and Journey to the Intelligent Enterprise
Srikant77
 
Globus Connect Server Deep Dive - GlobusWorld 2024
Globus Connect Server Deep Dive - GlobusWorld 2024Globus Connect Server Deep Dive - GlobusWorld 2024
Globus Connect Server Deep Dive - GlobusWorld 2024
Globus
 
Beyond Event Sourcing - Embracing CRUD for Wix Platform - Java.IL
Beyond Event Sourcing - Embracing CRUD for Wix Platform - Java.ILBeyond Event Sourcing - Embracing CRUD for Wix Platform - Java.IL
Beyond Event Sourcing - Embracing CRUD for Wix Platform - Java.IL
Natan Silnitsky
 
Enhancing Project Management Efficiency_ Leveraging AI Tools like ChatGPT.pdf
Enhancing Project Management Efficiency_ Leveraging AI Tools like ChatGPT.pdfEnhancing Project Management Efficiency_ Leveraging AI Tools like ChatGPT.pdf
Enhancing Project Management Efficiency_ Leveraging AI Tools like ChatGPT.pdf
Jay Das
 
A Comprehensive Look at Generative AI in Retail App Testing.pdf
A Comprehensive Look at Generative AI in Retail App Testing.pdfA Comprehensive Look at Generative AI in Retail App Testing.pdf
A Comprehensive Look at Generative AI in Retail App Testing.pdf
kalichargn70th171
 
Quarkus Hidden and Forbidden Extensions
Quarkus Hidden and Forbidden ExtensionsQuarkus Hidden and Forbidden Extensions
Quarkus Hidden and Forbidden Extensions
Max Andersen
 
How Recreation Management Software Can Streamline Your Operations.pptx
How Recreation Management Software Can Streamline Your Operations.pptxHow Recreation Management Software Can Streamline Your Operations.pptx
How Recreation Management Software Can Streamline Your Operations.pptx
wottaspaceseo
 
Prosigns: Transforming Business with Tailored Technology Solutions
Prosigns: Transforming Business with Tailored Technology SolutionsProsigns: Transforming Business with Tailored Technology Solutions
Prosigns: Transforming Business with Tailored Technology Solutions
Prosigns
 
Climate Science Flows: Enabling Petabyte-Scale Climate Analysis with the Eart...
Climate Science Flows: Enabling Petabyte-Scale Climate Analysis with the Eart...Climate Science Flows: Enabling Petabyte-Scale Climate Analysis with the Eart...
Climate Science Flows: Enabling Petabyte-Scale Climate Analysis with the Eart...
Globus
 
Orion Context Broker introduction 20240604
Orion Context Broker introduction 20240604Orion Context Broker introduction 20240604
Orion Context Broker introduction 20240604
Fermin Galan
 
Globus Compute wth IRI Workflows - GlobusWorld 2024
Globus Compute wth IRI Workflows - GlobusWorld 2024Globus Compute wth IRI Workflows - GlobusWorld 2024
Globus Compute wth IRI Workflows - GlobusWorld 2024
Globus
 
Gamify Your Mind; The Secret Sauce to Delivering Success, Continuously Improv...
Gamify Your Mind; The Secret Sauce to Delivering Success, Continuously Improv...Gamify Your Mind; The Secret Sauce to Delivering Success, Continuously Improv...
Gamify Your Mind; The Secret Sauce to Delivering Success, Continuously Improv...
Shahin Sheidaei
 
Developing Distributed High-performance Computing Capabilities of an Open Sci...
Developing Distributed High-performance Computing Capabilities of an Open Sci...Developing Distributed High-performance Computing Capabilities of an Open Sci...
Developing Distributed High-performance Computing Capabilities of an Open Sci...
Globus
 
Cyaniclab : Software Development Agency Portfolio.pdf
Cyaniclab : Software Development Agency Portfolio.pdfCyaniclab : Software Development Agency Portfolio.pdf
Cyaniclab : Software Development Agency Portfolio.pdf
Cyanic lab
 
Enterprise Resource Planning System in Telangana
Enterprise Resource Planning System in TelanganaEnterprise Resource Planning System in Telangana
Enterprise Resource Planning System in Telangana
NYGGS Automation Suite
 
Webinar: Salesforce Document Management 2.0 - Smarter, Faster, Better
Webinar: Salesforce Document Management 2.0 - Smarter, Faster, BetterWebinar: Salesforce Document Management 2.0 - Smarter, Faster, Better
Webinar: Salesforce Document Management 2.0 - Smarter, Faster, Better
XfilesPro
 
How to Position Your Globus Data Portal for Success Ten Good Practices
How to Position Your Globus Data Portal for Success Ten Good PracticesHow to Position Your Globus Data Portal for Success Ten Good Practices
How to Position Your Globus Data Portal for Success Ten Good Practices
Globus
 
Cracking the code review at SpringIO 2024
Cracking the code review at SpringIO 2024Cracking the code review at SpringIO 2024
Cracking the code review at SpringIO 2024
Paco van Beckhoven
 
Exploring Innovations in Data Repository Solutions - Insights from the U.S. G...
Exploring Innovations in Data Repository Solutions - Insights from the U.S. G...Exploring Innovations in Data Repository Solutions - Insights from the U.S. G...
Exploring Innovations in Data Repository Solutions - Insights from the U.S. G...
Globus
 
Field Employee Tracking System| MiTrack App| Best Employee Tracking Solution|...
Field Employee Tracking System| MiTrack App| Best Employee Tracking Solution|...Field Employee Tracking System| MiTrack App| Best Employee Tracking Solution|...
Field Employee Tracking System| MiTrack App| Best Employee Tracking Solution|...
informapgpstrackings
 

Recently uploaded (20)

RISE with SAP and Journey to the Intelligent Enterprise
RISE with SAP and Journey to the Intelligent EnterpriseRISE with SAP and Journey to the Intelligent Enterprise
RISE with SAP and Journey to the Intelligent Enterprise
 
Globus Connect Server Deep Dive - GlobusWorld 2024
Globus Connect Server Deep Dive - GlobusWorld 2024Globus Connect Server Deep Dive - GlobusWorld 2024
Globus Connect Server Deep Dive - GlobusWorld 2024
 
Beyond Event Sourcing - Embracing CRUD for Wix Platform - Java.IL
Beyond Event Sourcing - Embracing CRUD for Wix Platform - Java.ILBeyond Event Sourcing - Embracing CRUD for Wix Platform - Java.IL
Beyond Event Sourcing - Embracing CRUD for Wix Platform - Java.IL
 
Enhancing Project Management Efficiency_ Leveraging AI Tools like ChatGPT.pdf
Enhancing Project Management Efficiency_ Leveraging AI Tools like ChatGPT.pdfEnhancing Project Management Efficiency_ Leveraging AI Tools like ChatGPT.pdf
Enhancing Project Management Efficiency_ Leveraging AI Tools like ChatGPT.pdf
 
A Comprehensive Look at Generative AI in Retail App Testing.pdf
A Comprehensive Look at Generative AI in Retail App Testing.pdfA Comprehensive Look at Generative AI in Retail App Testing.pdf
A Comprehensive Look at Generative AI in Retail App Testing.pdf
 
Quarkus Hidden and Forbidden Extensions
Quarkus Hidden and Forbidden ExtensionsQuarkus Hidden and Forbidden Extensions
Quarkus Hidden and Forbidden Extensions
 
How Recreation Management Software Can Streamline Your Operations.pptx
How Recreation Management Software Can Streamline Your Operations.pptxHow Recreation Management Software Can Streamline Your Operations.pptx
How Recreation Management Software Can Streamline Your Operations.pptx
 
Prosigns: Transforming Business with Tailored Technology Solutions
Prosigns: Transforming Business with Tailored Technology SolutionsProsigns: Transforming Business with Tailored Technology Solutions
Prosigns: Transforming Business with Tailored Technology Solutions
 
Climate Science Flows: Enabling Petabyte-Scale Climate Analysis with the Eart...
Climate Science Flows: Enabling Petabyte-Scale Climate Analysis with the Eart...Climate Science Flows: Enabling Petabyte-Scale Climate Analysis with the Eart...
Climate Science Flows: Enabling Petabyte-Scale Climate Analysis with the Eart...
 
Orion Context Broker introduction 20240604
Orion Context Broker introduction 20240604Orion Context Broker introduction 20240604
Orion Context Broker introduction 20240604
 
Globus Compute wth IRI Workflows - GlobusWorld 2024
Globus Compute wth IRI Workflows - GlobusWorld 2024Globus Compute wth IRI Workflows - GlobusWorld 2024
Globus Compute wth IRI Workflows - GlobusWorld 2024
 
Gamify Your Mind; The Secret Sauce to Delivering Success, Continuously Improv...
Gamify Your Mind; The Secret Sauce to Delivering Success, Continuously Improv...Gamify Your Mind; The Secret Sauce to Delivering Success, Continuously Improv...
Gamify Your Mind; The Secret Sauce to Delivering Success, Continuously Improv...
 
Developing Distributed High-performance Computing Capabilities of an Open Sci...
Developing Distributed High-performance Computing Capabilities of an Open Sci...Developing Distributed High-performance Computing Capabilities of an Open Sci...
Developing Distributed High-performance Computing Capabilities of an Open Sci...
 
Cyaniclab : Software Development Agency Portfolio.pdf
Cyaniclab : Software Development Agency Portfolio.pdfCyaniclab : Software Development Agency Portfolio.pdf
Cyaniclab : Software Development Agency Portfolio.pdf
 
Enterprise Resource Planning System in Telangana
Enterprise Resource Planning System in TelanganaEnterprise Resource Planning System in Telangana
Enterprise Resource Planning System in Telangana
 
Webinar: Salesforce Document Management 2.0 - Smarter, Faster, Better
Webinar: Salesforce Document Management 2.0 - Smarter, Faster, BetterWebinar: Salesforce Document Management 2.0 - Smarter, Faster, Better
Webinar: Salesforce Document Management 2.0 - Smarter, Faster, Better
 
How to Position Your Globus Data Portal for Success Ten Good Practices
How to Position Your Globus Data Portal for Success Ten Good PracticesHow to Position Your Globus Data Portal for Success Ten Good Practices
How to Position Your Globus Data Portal for Success Ten Good Practices
 
Cracking the code review at SpringIO 2024
Cracking the code review at SpringIO 2024Cracking the code review at SpringIO 2024
Cracking the code review at SpringIO 2024
 
Exploring Innovations in Data Repository Solutions - Insights from the U.S. G...
Exploring Innovations in Data Repository Solutions - Insights from the U.S. G...Exploring Innovations in Data Repository Solutions - Insights from the U.S. G...
Exploring Innovations in Data Repository Solutions - Insights from the U.S. G...
 
Field Employee Tracking System| MiTrack App| Best Employee Tracking Solution|...
Field Employee Tracking System| MiTrack App| Best Employee Tracking Solution|...Field Employee Tracking System| MiTrack App| Best Employee Tracking Solution|...
Field Employee Tracking System| MiTrack App| Best Employee Tracking Solution|...
 

레진코믹스가 코틀린으로 간 까닭은?

  • 1.
  • 2.
  • 3.
  • 4. Statically typed programming language for the JVM, Android and the browser 100% interoperable with Java™
  • 5.
  • 6.
  • 7.
  • 8.
  • 9.
  • 10.
  • 11.
  • 12. PaymentRobot payment = new PaymentRobot(); ResultRobot result = payment .amount(42_00) .recipient("foo@bar.com") .send(); result.isSuccess();
  • 13. val payment = PaymentRobot() val result = payment .amount(4200) .recipient("foo@bar.com") .send() result.isSuccess()
  • 14. val result = payment { amount(4200) recipient("foo@bar.com") }.send() result.isSuccess()
  • 17. payment { amount(4200) recipient("foo@bar.com") send() } birthday { date(1970, 1, 1) next() } ssn { value("123-56-7890") next() } result { isSuccess() }
  • 18.
  • 19.
  • 20.
  • 21.
  • 22.
  • 23.
  • 24. public String foo() {
 ...
 } // null or non-null?
 String f = foo();
  • 25. @NonNull public String foo() {
 ...
 } // non-null
 String f = foo();
  • 26. // nullable
 fun nullable(): String? {
 ...
 }
 
 // non-null
 fun nonNull(): String {
 ...
 }
  • 27. // ok
 val foo: String? = "foo"
 
 // compile error
 val bar: String = null
  • 28. String foo = "foo";
 String bar = "foo";
 // isEquals: true boolean isEquals = foo.equals(bar);
  • 29. String foo = "foo";
 String bar = "foo";
 
 // isEquals: false boolean isEquals = foo == bar;
  • 30. val foo = "foo"
 val bar = "bar"
 
 // isEquals: true val isEquals = foo == bar
  • 31.
  • 33. // OtherFunctions.kt
 package com.sample.package.others
 // import function foo()
 import com.sample.package.foo
 
 fun baz() {
 foo()
 }
  • 34.
  • 35.
  • 36. public class MainActivity extends AppCompatActivity {
 
 Button btnCalligraphy;
 
 @Override
 protected void onCreate(Bundle savedInstanceState) {
 super.onCreate(savedInstanceState);
 setContentView(R.layout.activity_main);
 
 btnCalligraphy = (Button) findViewById(R.id.btn_calligraphy);
 
 btnCalligraphy.setOnClickListener(new View.OnClickListener() {
 @Override
 public void onClick(View view) {
 // Do something
 }
 });
 
 }
 }
  • 37. class MainActivity : AppCompatActivity() {
 
 override fun onCreate(savedInstanceState: Bundle?) {
 super.onCreate(savedInstanceState)
 setContentView(R.layout.activity_main)
 
 btn_calligraphy.setOnClickListener {
 // Do something
 }
 }
 }
  • 38. view.setOnClickListener(new View.OnClickListener() {
 @Override
 public void onClick(View v) {
 Toast.makeText( v.getContext().getApplicationContext(),
 "Hello", Toast.LENGTH_SHORT).show();
 }
 });
  • 40. view.setOnClickListener { v ->
 
 Toast.makeText(v.context.applicationContext,
 "Hello", Toast.LENGTH_SHORT).show()
 
 }
  • 42. val people : List<String> = .. 
 people.filter { it.startsWith('S') }
 .filter { it.length < 10 }
 .onEach { it.toUpperCase() }
 .forEach { println(it) }
  • 43. val people : List<String> = .. 
 people.filter { it.startsWith('S') }
 .filter { it.length < 10 }
 .onEach(String::toUpperCase)
 .forEach(::println)
  • 44. val people : List<String> = .. 
 people.stream()
 .filter { it.startsWith('S') }
 .filter { it.length < 10 }
 .map(String::toUpperCase)
 .forEach(::println)
  • 45. var foo : String = "Foo"
 foo = "FOO"
 
 val bar : String = "Bar"
 bar = "BAR"
  • 46. var foo : String = "Foo"
 foo = "FOO"
 
 val bar : String = "Bar"
 bar = "BAR" Compile Error (val cannot be reassigned)
  • 47. val mutableList : MutableList<String> = mutableListOf(“foo", "bar", "baz")
 mutableList.add("fizz")
 
 val immutableList : List<String> = listOf("foo", "bar", "baz")
 immutableList.add("fizz")
  • 48. val mutableList : MutableList<String> = mutableListOf("foo", "bar", "baz")
 mutableList.add("fizz")
 
 val immutableList : List<String> = listOf("foo", "bar", "baz")
 immutableList.add("fizz") Compile Error (val cannot be reassigned)
  • 49.
  • 50.
  • 51. val emptyStringList = listOf<String>()
 
 val cities = listOf("Seoul", "Busan")
 
 val mutableCities = mutableListOf("Seoul, Busan")
  • 52. val emptyStringSet = setOf<String>()
 
 val cities = setOf("Seoul", "Busan")
 
 val mutableCities = mutableSetOf("Seoul, Busan")
  • 53. val pair : Pair<String, String> = Pair("Seoul", "서울")
  • 54. val pair : Pair<String, String> = "Seoul" to "서울"
  • 55. public class Person {
 
 String name;
 
 String address;
 
 Person(String name, String address) {
 this.name = name;
 this.address = address;
 }
 
 public String getAddress() {
 return address;
 }
 
 public void setAddress(String address) {
 this.address = address;
 }
 }
  • 56. public class Person {
 
 String name;
 
 String address;
 
 Person(String name, String address) {
 this.name = name;
 this.address = address;
 }
 
 public String getAddress() {
 return address;
 }
 
 public void setAddress(String address) {
 this.address = address;
 }
 
 @Override
 public boolean equals(Object o) {
 if (this == o) {
 return true;
 }
 if (o == null || getClass() != o.getClass()) {
 return false;
 }
 
 Person person = (Person) o;
 
 if (!name.equals(person.name)) {
 return false;
 }
 return address != null ? address.equals(person.address) : person.address == null;
 
 }
 
 @Override
 public int hashCode() {
 int result = name.hashCode();
 result = 31 * result + (address != null ? address.hashCode() : 0);
 return result;
 }
 
 @Override

  • 57. data class Person(val name: String, val address: String)
  • 59. // Define an extension function on Context fun Context.toast(message: String) {
 Toast.makeText(this.applicationContext, message, Toast.LENGTH_SHORT).show()
 } // available in class Context and its descendants toast("Hello, Kotlin!")
  • 60.
  • 61.
  • 62.
  • 63.