Slide 1

Slide 1 text

5 / 8 # 2013

Slide 2

Slide 2 text

 • i e • d # k • 7 A N T S • 1@7 5 KC 3 5 78 7 • laD • • 7 27 7 # nm N • 0 / # bo g DN # KE O 7 8 #

Slide 3

Slide 3 text

 # 1/02

Slide 4

Slide 4 text

       # 2013 / /

Slide 5

Slide 5 text

! # 1/02 fun main(args: Array) { println("Hello world!") }

Slide 6

Slide 6 text

  kotlin.io.readLine000 JVM 58 # 3126 / / fun main(args: Array) { val name = readLine() println("Hello $name!") }

Slide 7

Slide 7 text

# 2013 / / import java.io.BufferedReader import java.io.File fun main(args: Array) { val name = File("name.txt") .bufferedReader() .use { it.readLine() } println("Hello $name!") }

Slide 8

Slide 8 text

       # 1/02

Slide 9

Slide 9 text

# 2013 / /

Slide 10

Slide 10 text

 • 2 /-1 3 /- 20021 C 8 # # # 2 /-1 0 # fun main(args: Array) { println("Hello world!") } 20021 2 /-1 5

Slide 11

Slide 11 text

 • 15 2/ 2/- 0 1 # *5 2/ 3 1 fun main(args: Array) { val name = readLine() println("Hello $name!") } *5 2/ 8

Slide 12

Slide 12 text

 # 53 01 / 1 # import java.io.BufferedReader import java.io.File fun main(args: Array) { val name = File("name.txt") .bufferedReader() .use { it.readLine() } println("Hello $name!") } 01 / 28

Slide 13

Slide 13 text

 • /350-2 5 0- # # # 8 350-2 1 /5 # fun main(args: Array) { window.alert("Hello World!") } 350-2

Slide 14

Slide 14 text

     # 2013 / /

Slide 15

Slide 15 text

   # 1/02 expect object Hello { fun say() }

Slide 16

Slide 16 text

  # 2013 / / actual object Hello { actual fun say() = showDialog("Hello!") } actual object Hello { actual fun say() = window.alert("Hello!") }

Slide 17

Slide 17 text

• 72 3 8 • 2 5 # 1 0 / expect open class BigInteger(`val`: String) { open fun add(`val`: BigInteger): BigInteger } actual typealias BigInteger = java.math.BigInteger  

Slide 18

Slide 18 text

• ,8 , 31132 13 0, 0 351 13 0, # # # 3 0 2 1 / # fun main(args: Array) { val bi = BigInteger(”10”) val sum = bi.add(BigInteger(”20”)) ... } 

Slide 19

Slide 19 text

• 8 9 0 0 351 13 0 # 3 0 2 1 / fun main(args: Array) { val bi = BigInteger(”10”) val div = bi.divide(BigInteger(”5”)) ... } 

Slide 20

Slide 20 text

# 1/02 #

Slide 21

Slide 21 text

    # 1/02 #

Slide 22

Slide 22 text

# 1/02 ##

Slide 23

Slide 23 text

    # 1/02 #

Slide 24

Slide 24 text

 $  #!  "   # 2013 / / #

Slide 25

Slide 25 text

 # 1/02 #

Slide 26

Slide 26 text

# D C 8 # 5 5 K K 163 K MO A 56 0 6 6 2 2 2 D 56 0 6 6 56 0 6 6 /6 /6 /6 /6   C

Slide 27

Slide 27 text

# ) ) LJK D D ( 12 5 7 D D D 3 CD 3 CD 3 CD 0 3 CD VSW 0VSW b T 0 8D // 0VSW 0 8D 2VSW 0 8D D 8 CCML 0 a A 8D  J O dc

Slide 28

Slide 28 text

# ( ( SN A ( ) CA b 12 b 5 b A CA C A CA C A CA C 3 D 3 D 3 D /A 3 D fl aJc / aJc fn J /A 8 / aJc /A 8 2 aJc /A 8 8 DDTS  N M i /A me 8 po K A 0 VW / AC kd O LTL

Slide 29

Slide 29 text

# ( ( D 8 9 ) 58 V M T 1 M T V L 58 23 28 1 M T 58 23 28 / M T 58 23 28 2 2 382 K S 1 M T K S 1 M T K S / M T K S V M T 05 K SJ V L 58 5 53

Slide 30

Slide 30 text

  • U X K in RK el m -3- 0 K • - 15K ck /- R15 20 /- K U 8 U oa R U I R # # # 5 20 3 1

Slide 31

Slide 31 text

  • 5820 aK D D • K0 8 / 8fJ J • e JI 8 • S c 5820 D k i # I 5820 3 18

Slide 32

Slide 32 text

 # 8 53 /- 2 13 2 - .8 8-8/ 3 3 8 53 5 3 5 08: 5/

Slide 33

Slide 33 text

 # 1/02

Slide 34

Slide 34 text

     • 4 30 / 0 8 4 K • 53354 58204 C TS K # 58204 3 18 val hoge: dynamic = object {} hoge.fuga = {} // OK hoge.piyo().xxx.yyy() // OK

Slide 35

Slide 35 text

        • 351 2 3 23 3 8 K # 8 03 / 3 expect class System { companion object { fun currentTimeMillis(): Long } } // NG actual typealias System = java.lang.System

Slide 36

Slide 36 text

        • 6 0 5 8 K 8 31 2 32 3 6 K # 360 2 1 /6 // OK actual class System { actual companion object { actual fun currentTimeMillis() = java.lang.System.currentTimeMillis() } }

Slide 37

Slide 37 text

        • 7 0 5 8 K 8 31 2 32 3 K # 3 0 2 1 / // OK actual fun System.Companion.currentTimeMillis() = java.lang.System.currentTimeMillis() class System { companion object } expect fun System.Companion.currentTimeMillis(): Long

Slide 38

Slide 38 text

    • - C5 # A A 5BB • .A ,A Wkp df • 8CA 8 03 3 C C .A RrM J • 03W sWtOWv 0 ,RrM J • .A # A ACA • a b e cef • / B 5 AC uio • 2 -5 5 -3W1CA SWj nJ mK / B 5 AC lJ J # # PR .A

Slide 39

Slide 39 text

 • 0 3 8 521 M 9 iK 9 9 ,0 2 l akJk • 0 3 8f X X e N /080 9 f jKJ S • cK # # # P 9 8