Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
あんまり触れられてない気がする、Kotlin1.3の ありがたい追加機能
Search
yamacraft
November 29, 2018
Technology
0
2.9k
あんまり触れられてない気がする、Kotlin1.3の ありがたい追加機能
2018年11月29日(木)にYahoo LODGEで開催された筋肉.ktの資料です
yamacraft
November 29, 2018
Tweet
Share
More Decks by yamacraft
See All by yamacraft
なぜアプリのデザインとその実装はうまくいかないのか?
yamacraft
0
190
ありがたいUIをもっと大事にしたい
yamacraft
2
2.3k
Quickstart-android/mlkitについて
yamacraft
2
4.6k
Firebase関連をCIでデプロイするときのTips
yamacraft
0
4.9k
開発用途で Realtime Databaseを 導入した話
yamacraft
2
4.6k
ciecleci/androidのOpenSSLに気をつけよう
yamacraft
0
700
Realtime Databaseに向いてる・向いてないサービス
yamacraft
0
910
社内用アプリでFirebaseを使っている話
yamacraft
2
2k
弊社のアプリ開発CI環境
yamacraft
0
1.2k
Other Decks in Technology
See All in Technology
堅牢な認証基盤の実現 TypeScriptで代数的データ型を活用する
kakehashi
PRO
2
240
型システムを知りたい人のための型検査器作成入門
mame
15
3.9k
ObsidianをMCP連携させてみる
ttnyt8701
2
130
In Praise of "Normal" Engineers (LDX3)
charity
2
1.1k
新規プロダクト開発、AIでどう変わった? #デザインエンジニアMeetup
bengo4com
0
490
新卒3年目の後悔〜機械学習モデルジョブの運用を頑張った話〜
kameitomohiro
0
350
CIでのgolangci-lintの実行を約90%削減した話
kazukihayase
0
320
Navigation3でViewModelにデータを渡す方法
mikanichinose
0
120
Observability infrastructure behind the trillion-messages scale Kafka platform
lycorptech_jp
PRO
0
110
JSX - 歴史を振り返り、⾯⽩がって、エモくなろう
pal4de
3
1k
AWS と定理証明 〜ポリシー言語 Cedar 開発の舞台裏〜 #fp_matsuri / FP Matsuri 2025
ytaka23
9
2.5k
菸酒生在 LINE Taiwan 的後端雙刀流
line_developers_tw
PRO
0
250
Featured
See All Featured
A better future with KSS
kneath
239
17k
The Art of Programming - Codeland 2020
erikaheidi
54
13k
Chrome DevTools: State of the Union 2024 - Debugging React & Beyond
addyosmani
6
690
The Myth of the Modular Monolith - Day 2 Keynote - Rails World 2024
eileencodes
26
2.8k
Navigating Team Friction
lara
186
15k
Principles of Awesome APIs and How to Build Them.
keavy
126
17k
Balancing Empowerment & Direction
lara
1
320
A designer walks into a library…
pauljervisheath
206
24k
Responsive Adventures: Dirty Tricks From The Dark Corners of Front-End
smashingmag
252
21k
Typedesign – Prime Four
hannesfritz
42
2.7k
StorybookのUI Testing Handbookを読んだ
zakiyama
30
5.8k
Bootstrapping a Software Product
garrettdimon
PRO
307
110k
Transcript
͋Μ·Γ৮ΕΒΕͯͳ͍ ؾ͕͢ΔɺKotlin1.3ͷ ͋Γ͕͍ͨՃػೳ @yamacraft
profile • @yamacraft • Mobile Application Engineer • Freelance /
(private)team Y.G.E. • Getting Over Itɹˠˠˠ • 130↑wins / BestTime 8min
trainingʢonly machineʣ • νΣετϓϨε 70ʙ80kg 4ʙ6rep * 3 • ϩʔσϧτΠυ
65ʙ75kg 4ʙ6rep * 3 • ϓϧμϯ 75kg 4ʙ6rep * 3 • ϨοάϓϨε 125ʙ135kg 4ʙ6rep * 3 • and more
physical https://athletebody.jp/2017/10/31/skill-level-assessment/
trouble • Ϛγϯ͚ͩͩͱѲྗશવ͔ͭͳ͍ • CoC #1͕ด͡ΒΕͳͯ͘ԜΜͩ • όοΫΤΫεςϯγϣϯ͕δϜʹͳ͍ • δϜͷϑϦʔΣΠτκʔϯ͕ڱ͗͢Δ
Kotlin 1.3ͰՃ͞Εͨ ͪΐͬͱخ͍͠ػೳͷհ https://kotlinlang.org/docs/reference/whatsnew13.html
ͦͷલʹ
৽ػೳͷνΣοΫͬͯ Ͳ͏ͬͯ֬ೝ͠·͔͢ʁ
UnitTestͰࢼ͢ͷ͕͓͢͢Ί ※ॾઆ͋Γ·͢
ຊʹΓ·͢
Kotlin 1.3ͰՃ͞Εͨ ͪΐͬͱخ͍͠ػೳͷհ https://kotlinlang.org/docs/reference/whatsnew13.html
RandomAPIͷՃ • kotlin.random.Random͕Ճ͞Εͨ • ཚੜʹjava.util.*Λར༻͠ͳͯ͘ࡁΉΑ͏ ʹͳͬͨ • java.util.Randomಉ༷ʹɺ֤ܕͰग़ྗՄೳ • Kotlin
Native͋ͨΓ͋Γ͕͍ͨͣ
RandomAPIͷՃ
ίϨΫγϣϯܥʹ isNullOrEmpty()ͷՃ • Stringʹ͋ͬͨisNullOrEmpty()͕Collection ListɺmapͳͲͰར༻Մೳʹͳͬͨ • isEmpty()ͳΒલ͔Β͋Γ·ͨ͠ • nullνΣοΫ·ͱΊͯͰ͖ͯେม͋Γ͕͍ͨ
ίϨΫγϣϯܥʹ isNullOrEmpty()ͷՃ
unsignedʢූ߸ͳ͠ʣܕͷ Ճ • UByte … 0ʙ255 • UShort … 0ʙ65535
• UInt … 0ʙ2^32-1 • ULong … 0ʙ2^64-1 • ਓʹΑͬͯϝνϟΫνϟ͋Γ͕͍ͨ…
unsignedʢූ߸ͳ͠ʣܕͷ Ճ
ifEmpty()ɺifBlankͷՃ • if(x.isEmpty){}ͱΒͣʹɺx.ifEmpty{}Ͱۭ ۭന࣌ͷॲཧ͕͍͖ͳΓॻ͚ΔΑ͏ʹͳͬͨ • kotlinΆ͘ͳͬͯ͋Γ͕͍ͨ
ifEmpty()ɺifBlankͷՃ
ଞʹ͍Ζ͍Ζ͋ΔͷͰ νΣοΫͯ͠ΈΑ͏ʂ https://kotlinlang.org/docs/reference/whatsnew13.html
͓͠·͍