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.4k
あんまり触れられてない気がする、Kotlin1.3の ありがたい追加機能
2018年11月29日(木)にYahoo LODGEで開催された筋肉.ktの資料です
yamacraft
November 29, 2018
Tweet
Share
More Decks by yamacraft
See All by yamacraft
なぜアプリのデザインとその実装はうまくいかないのか?
yamacraft
0
140
ありがたいUIをもっと大事にしたい
yamacraft
2
2.1k
Quickstart-android/mlkitについて
yamacraft
2
4.1k
Firebase関連をCIでデプロイするときのTips
yamacraft
0
4.7k
開発用途で Realtime Databaseを 導入した話
yamacraft
2
4.4k
ciecleci/androidのOpenSSLに気をつけよう
yamacraft
0
620
Realtime Databaseに向いてる・向いてないサービス
yamacraft
0
790
社内用アプリでFirebaseを使っている話
yamacraft
2
1.8k
弊社のアプリ開発CI環境
yamacraft
0
1.1k
Other Decks in Technology
See All in Technology
Delivering Millions of Messages within seconds @ Duolingo
pelelgrino
0
320
Data and AI Governance: Existing Challenges and Emerging Trends
scotthsieh825
0
150
PHPカンファレンス小田原2024
ysknsid25
3
660
オブザーバビリティの Primary Signals
onk
PRO
0
540
o11y入門_外形監視を利用したWebアプリケーションへの最適なモニタリング_TechBrew
k5k
3
100
Tableau事例紹介 / Tableau Case Study of Eureka
kazuya_araki_tokyo
1
170
テストプロセスで大事にしていること #jasstnano
makky_tyuyan
0
110
ChatGPT for IT Service Management (IT Pro)
dahatake
2
120
AIQ株式会社 エンジニア向け会社紹介資料
aiqlab
0
370
"好き"との生活/Regularly update profile with GitHub Actions
judeeeee
0
150
The CloudCompare project by Dr. Daniel Girardeau-Montaut
kentaitakura
0
500
Postman v10リリース後を振り返る
nagix
0
130
Featured
See All Featured
How to name files
jennybc
64
92k
Fashionably flexible responsive web design (full day workshop)
malarkey
397
65k
No one is an island. Learnings from fostering a developers community.
thoeni
14
2.1k
Typedesign – Prime Four
hannesfritz
36
2.1k
WebSockets: Embracing the real-time Web
robhawkes
59
7k
GitHub's CSS Performance
jonrohan
1023
450k
Being A Developer After 40
akosma
56
580k
The Power of CSS Pseudo Elements
geoffreycrofte
59
5k
Side Projects
sachag
451
41k
The Success of Rails: Ensuring Growth for the Next 100 Years
eileencodes
29
6k
The Invisible Side of Design
smashingmag
294
49k
Helping Users Find Their Own Way: Creating Modern Search Experiences
danielanewman
19
1.9k
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
͓͠·͍