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
apply() 要らなくない?
Search
Motoi Washida
August 22, 2017
Programming
1.5k
2
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
apply() 要らなくない?
2017年の夏のKotlin LT祭での発表資料です。
https://kotlin.connpass.com/event/61427/
Motoi Washida
August 22, 2017
More Decks by Motoi Washida
See All by Motoi Washida
CLIPでマルチモーダル画像検索 →とても良い
wm3
3
1.1k
アプリのための「レイヤー化」アーキテクチャ / Droid Meetup 2019-03
wm3
0
2.6k
Material Design の社内勉強会を行った / Android Engineer Design 1
wm3
1
210
API仕様書から自前でコード生成して運用した話 / DroidKaigi 2018 Reject Conference
wm3
0
940
Firebase Analytics で 画像ロードのパフォーマンス を測定し、改善をした話
wm3
2
1.5k
Tunnel 社内勉強会 Swift の紹介
wm3
0
340
iOS の Reactive 系ライブラリ
wm3
1
980
Other Decks in Programming
See All in Programming
Cloudflare is Agents
chimame
0
160
PHP Application における Kubernetes 内 gRPC 通信
ganchiku
0
590
Google Apps Script で Ruby を動かす
kawahara
0
170
【やさしく解説 設計編・中級 #4】ルールの寿命と、システムの年輪
panda728
PRO
2
180
2年かけて Deno に DOMMatrix を実装した話 / How I implemented DOMMatrix in Deno over two years
petamoriken
0
210
AWS DevOps AgentのAzure接続機能を検証して見えた活用法/Use Cases Verified for the AWS DevOps Agent's Azure Connectivity Feature
masakiokuda
1
230
琵琶湖の水は止められてもNet--HTTPのリトライは止められない / You might be able to stop the water flow of Lake Biwa but you can't stop Net::HTTP retries
luccafort
PRO
0
670
言葉の格闘技のススメ~紙とペンと言葉から始める、キャリアの描き方~
progresscicada
2
140
AI時代のPHPer生存戦略 ~「言語、もうなんでもよくない?」に本気で向き合う~
vivion
0
320
Augmenting AI with the Power of Jakarta EE
ivargrimstad
0
560
仕様駆動開発へのトライを機に チームに適合する手法を模索し続けている話
freee
PRO
0
480
the container ship “Apple Silicon”@WWDC26 Recap -Japan-\(region).swift
shingangan
0
120
Featured
See All Featured
A Tale of Four Properties
chriscoyier
163
24k
Visual Storytelling: How to be a Superhuman Communicator
reverentgeek
2
610
Stewardship and Sustainability of Urban and Community Forests
pwiseman
0
460
My Coaching Mixtape
mlcsv
0
220
StorybookのUI Testing Handbookを読んだ
zakiyama
31
6.9k
16th Malabo Montpellier Forum Presentation
akademiya2063
PRO
0
350
The Impact of AI in SEO - AI Overviews June 2024 Edition
aleyda
5
1.2k
Navigating the moral maze — ethical principles for Al-driven product design
skipperchong
2
480
Amusing Abliteration
ianozsvald
1
240
New Earth Scene 8
popppiees
3
2.5k
Marketing to machines
jonoalderson
1
5.7k
Exploring anti-patterns in Rails
aemeredith
3
460
Transcript
BQQMZ 銲זֻזְ 똲歊㛇
荈䊹稱➜
荈䊹稱➜ ˖ せ똲歊㛇 ˖ 5XJUUFS!XN ˖ "OESPJEؒٝآص، J04瘝װ ˖
3PPN$MJQהְֲ؎ٝذٔ،ⱖ溪ך $(.涪⚥
(PPHMF*0ך傈ח,PUMJO䱰欽׃ת׃
ַֿ ,PUMJO娖♲٠剢ך 蕯鰳罏ָזַ鎉ְתׅ
➙傈鎉ְְ✲
None
BQQMZ
銲זֻזְ
None
BQQMZ
أ؝٦فꟼ侧ך♧א ⴱ劍⻉ָٖؒؖٝز ח剅ֽ
BQQMZ ⢪זְה // { "key1": 1, "key2": 8 } //
ΛҾʹͯؔ͠Λݺͼ͍ͨ val map = Bundle() map.putInt("key1", 1) map.putInt("key2", 8) someFunction(map)
BQQMZ ⢪ֲה // { "key1": 1, "key2": 8 } //
ΛҾʹͯؔ͠Λݺͼ͍ͨ someMethod(Bundle().apply { putInt("key1", 1) putInt("key2", 8) })
瀉ְ
ֶ׃ׯ
,PUMJOזדכ ˟ הְֲ״+BWB 4XJGU鴟חכזְ
ד✉欽ׅה 汤ְ湡鋅ֲ
None
ㄎן⳿׃㼎韋ָ ♶僇然ח
⢽
⢽ class Point { var x = 0; var y
= 0 } var y = 0 // มએݴ val p = Point().apply { x = 3 y = 4 // Ͳͬͪͷ y? } println("p = (${p.x}, ${p.y})") // p = (3, 4) Λग़ྗͦ͠͏
⢽ class Point { var x = 0; var y
= 0 } var y = 0 // มએݴ val p = Point().apply { x = 3 y = 4 // Ͳͬͪͷ y? } println("p = (${p.x}, ${p.y})") // p = (3, 0) Λग़ྗ (※)
➿剏周
BMTP
➿剏周 class Point { var x = 0; var y
= 0 } var y = 0 val p = Point().apply { x = 3 y = 4 } println("p = (${p.x}, ${p.y})") // p = (3, 0) Λग़ྗ
➿剏周 BMTP class Point { var x = 0; var
y = 0 } var y = 0 val p = Point().also { it.x = 3 it.y = 4 } println("p = (${p.x}, ${p.y})") // p = (3, 4) Λग़ྗ
せ➰ֹ䒷侧
➿剏周 class Point { var x = 0; var y
= 0 } var y = 0 val p = Point().apply { x = 3 y = 4 } println("p = (${p.x}, ${p.y})") // p = (3, 0) Λग़ྗ
➿剏周 せ➰ֹ䒷侧 class Point(val x: Int, val y: Int) var
y = 0 val p = Point( x = 3, y = 4 ) println("p = (${p.x}, ${p.y})") // p = (3, 4) Λग़ྗ
猘鋅
BQQMZ ״BMTP ך倯ָ㸜Ⰻ
➙儗ךⶰ⡲欽ָ㼰זְ 鏣鎘أة؎ٕז ⢪ֲ堣⠓ָקרזְ
את
BQQMZ SVO XJUIכ MFU BMTPד➿欽
דְְךדכ
None
׀䠐鋅꧊⚥
ΤϯδχΞืूத ͓ؾܰʹ࿈བྷ͍ͩ͘͞ʂ