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.5k
あんまり触れられてない気がする、Kotlin1.3の ありがたい追加機能
2018年11月29日(木)にYahoo LODGEで開催された筋肉.ktの資料です
yamacraft
November 29, 2018
Tweet
Share
More Decks by yamacraft
See All by yamacraft
なぜアプリのデザインとその実装はうまくいかないのか?
yamacraft
0
150
ありがたいUIをもっと大事にしたい
yamacraft
2
2.2k
Quickstart-android/mlkitについて
yamacraft
2
4.2k
Firebase関連をCIでデプロイするときのTips
yamacraft
0
4.8k
開発用途で Realtime Databaseを 導入した話
yamacraft
2
4.4k
ciecleci/androidのOpenSSLに気をつけよう
yamacraft
0
640
Realtime Databaseに向いてる・向いてないサービス
yamacraft
0
810
社内用アプリでFirebaseを使っている話
yamacraft
2
1.8k
弊社のアプリ開発CI環境
yamacraft
0
1.1k
Other Decks in Technology
See All in Technology
Amazon FSx for NetApp ONTAPのパフォーマンスチューニング要素をまとめてみた #cm_odyssey #devio2024
non97
0
220
VPoEの視点から見た、ヘンリーがサーバーサイドKotlinを使う理由 / Why Server-side Kotlin 2024
cho0o0
1
420
楽しくGoを学び合う、LayerXの勉強会文化 / LayerX's study culture of having fun and learning Go together
ar_tama
2
350
AI研修【MIXI 24新卒技術研修】
mixi_engineers
PRO
0
130
Luupの開発組織におけるインシデントマネジメントの変遷 ver.RoadtoSRENEXT2024
grimoh
1
270
目標設定は好きですか? アジャイルとともに目標と向き合い続ける方法 / Do you like target Management?
kakehashi
10
3k
ACRiルーム最新情報とAMD GPUサーバーのご紹介
anjn
0
150
Classmethod流のPlatform Engineering / classmethod-platform-engineering-devio2024
tomoki10
0
470
エンジニア向け会社紹介資料
caddi_eng
14
220k
Scaling Technical Excellence at 104: Evolution in AWS and Developer Empowerment
scotthsieh825
1
150
運用改善、不都合な真実 / 20240722-ssmjp-kaizen
opelab
17
8k
How to Think Like a Performance Engineer
csswizardry
4
590
Featured
See All Featured
Bash Introduction
62gerente
607
210k
Navigating Team Friction
lara
181
13k
5 minutes of I Can Smell Your CMS
philhawksworth
200
19k
Into the Great Unknown - MozCon
thekraken
20
1.3k
A better future with KSS
kneath
231
17k
How to Create Impact in a Changing Tech Landscape [PerfNow 2023]
tammyeverts
34
1.9k
Let's Do A Bunch of Simple Stuff to Make Websites Faster
chriscoyier
502
140k
CoffeeScript is Beautiful & I Never Want to Write Plain JavaScript Again
sstephenson
155
14k
The Illustrated Children's Guide to Kubernetes
chrisshort
39
47k
Designing on Purpose - Digital PM Summit 2013
jponch
113
6.6k
WebSockets: Embracing the real-time Web
robhawkes
59
7.2k
A designer walks into a library…
pauljervisheath
201
24k
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
͓͠·͍