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.7k
あんまり触れられてない気がする、Kotlin1.3の ありがたい追加機能
2018年11月29日(木)にYahoo LODGEで開催された筋肉.ktの資料です
yamacraft
November 29, 2018
Tweet
Share
More Decks by yamacraft
See All by yamacraft
なぜアプリのデザインとその実装はうまくいかないのか?
yamacraft
0
170
ありがたいUIをもっと大事にしたい
yamacraft
2
2.2k
Quickstart-android/mlkitについて
yamacraft
2
4.4k
Firebase関連をCIでデプロイするときのTips
yamacraft
0
4.9k
開発用途で Realtime Databaseを 導入した話
yamacraft
2
4.5k
ciecleci/androidのOpenSSLに気をつけよう
yamacraft
0
670
Realtime Databaseに向いてる・向いてないサービス
yamacraft
0
870
社内用アプリでFirebaseを使っている話
yamacraft
2
1.9k
弊社のアプリ開発CI環境
yamacraft
0
1.2k
Other Decks in Technology
See All in Technology
Opcodeを読んでいたら何故かphp-srcを読んでいた話
murashotaro
0
360
3年でバックエンドエンジニアが5倍に増えても破綻しなかったアーキテクチャ そして、これから / Software architecture that scales even with a 5x increase in backend engineers in 3 years
euglena1215
11
4.3k
Oracle Base Database Service 技術詳細
oracle4engineer
PRO
6
54k
[JAWS-UG新潟#20] re:Invent2024 -CloudOperationsアップデートについて-
shintaro_fukatsu
0
150
Fearsome File Formats
ange
0
550
Visual StudioとかIDE関連小ネタ話
kosmosebi
1
190
[トレノケ雲の会 mod.13] 3回目のre:Inventで気づいたこと -CloudOperationsを添えて-
shintaro_fukatsu
0
120
DevFest 2024 Incheon / Songdo - Compose UI 조합 심화
wisemuji
0
240
TypeScript開発にモジュラーモノリスを持ち込む
sansantech
PRO
3
860
I could be Wrong!! - Learning from Agile Experts
kawaguti
PRO
8
1.9k
NOT VALIDな検査制約 / check constraint that is not valid
yahonda
1
100
サイバー攻撃を想定したセキュリティガイドライン 策定とASM及びCNAPPの活用方法
syoshie
3
1.7k
Featured
See All Featured
Adopting Sorbet at Scale
ufuk
74
9.1k
The Pragmatic Product Professional
lauravandoore
32
6.3k
Visualization
eitanlees
146
15k
How to Create Impact in a Changing Tech Landscape [PerfNow 2023]
tammyeverts
49
2.2k
Performance Is Good for Brains [We Love Speed 2024]
tammyeverts
7
550
We Have a Design System, Now What?
morganepeng
51
7.3k
Java REST API Framework Comparison - PWX 2021
mraible
28
8.3k
Build your cross-platform service in a week with App Engine
jlugia
229
18k
Visualizing Your Data: Incorporating Mongo into Loggly Infrastructure
mongodb
44
9.3k
Git: the NoSQL Database
bkeepers
PRO
427
64k
Imperfection Machines: The Place of Print at Facebook
scottboms
266
13k
How to Think Like a Performance Engineer
csswizardry
22
1.3k
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
͓͠·͍