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.8k
あんまり触れられてない気がする、Kotlin1.3の ありがたい追加機能
2018年11月29日(木)にYahoo LODGEで開催された筋肉.ktの資料です
yamacraft
November 29, 2018
Tweet
Share
More Decks by yamacraft
See All by yamacraft
なぜアプリのデザインとその実装はうまくいかないのか?
yamacraft
0
180
ありがたいUIをもっと大事にしたい
yamacraft
2
2.3k
Quickstart-android/mlkitについて
yamacraft
2
4.5k
Firebase関連をCIでデプロイするときのTips
yamacraft
0
4.9k
開発用途で Realtime Databaseを 導入した話
yamacraft
2
4.6k
ciecleci/androidのOpenSSLに気をつけよう
yamacraft
0
690
Realtime Databaseに向いてる・向いてないサービス
yamacraft
0
890
社内用アプリでFirebaseを使っている話
yamacraft
2
1.9k
弊社のアプリ開発CI環境
yamacraft
0
1.2k
Other Decks in Technology
See All in Technology
От ручной разметки к LLM: как мы создавали облако тегов в Lamoda. Анастасия Ангелова, Data Scientist, Lamoda Tech
lamodatech
0
700
ブラウザのレガシー・独自機能を愛でる-Firefoxの脆弱性4選- / Browser Crash Club #1
masatokinugawa
1
450
AIで進化するソフトウェアテスト:mablの最新生成AI機能でQAを加速!
mfunaki
0
140
Vision Pro X Text to 3D Model ~How Swift and Generative Al Unlock a New Era of Spatial Computing~
igaryo0506
0
260
食べログが挑む!飲食店ネット予約システムで自動テスト無双して手動テストゼロを実現する戦略
hagevvashi
3
410
AWS Control Towerを 数年運用してきての気づきとこれから/aws-controltower-ops-tips
tadayukinakamura
0
130
SnowflakeとDatabricks両方でRAGを構築してみた
kameitomohiro
1
200
Amazon CloudWatchで始める エンドユーザー体験のモニタリング
o11yfes2023
0
180
CBになったのでEKSのこともっと知ってもらいたい!
daitak
1
160
watsonx.data上のベクトル・データベース Milvusを見てみよう/20250418-milvus-dojo
mayumihirano
0
110
フロントエンドも盛り上げたい!フロントエンドCBとAmplifyの軌跡
mkdev10
2
270
Amazon S3 Tables + Amazon Athena / Apache Iceberg
okaru
0
270
Featured
See All Featured
Fantastic passwords and where to find them - at NoRuKo
philnash
51
3.1k
GraphQLの誤解/rethinking-graphql
sonatard
71
10k
It's Worth the Effort
3n
184
28k
A Tale of Four Properties
chriscoyier
158
23k
Responsive Adventures: Dirty Tricks From The Dark Corners of Front-End
smashingmag
251
21k
Docker and Python
trallard
44
3.3k
RailsConf 2023
tenderlove
30
1.1k
Building Flexible Design Systems
yeseniaperezcruz
329
38k
Cheating the UX When There Is Nothing More to Optimize - PixelPioneers
stephaniewalter
280
13k
The World Runs on Bad Software
bkeepers
PRO
67
11k
The Power of CSS Pseudo Elements
geoffreycrofte
75
5.8k
Exploring the Power of Turbo Streams & Action Cable | RailsConf2023
kevinliebholz
32
5.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
͓͠·͍