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
Introducing Function Builder
Search
100059
December 17, 2019
Technology
3
840
Introducing Function Builder
potatotips #267
2019/12/17
100059
December 17, 2019
Tweet
Share
More Decks by 100059
See All by 100059
アクセシビリティが高いFlutterアプリケーションを開発する
akihisasengoku
2
3.8k
Flutter Accessibility
akihisasengoku
1
680
組織作りで大切にしていること
akihisasengoku
0
110
Bitriseのリファクタリング
akihisasengoku
1
330
Awaiting for New UI in iOS 13
akihisasengoku
0
1.5k
RxSwiftのテスト入門
akihisasengoku
1
1.1k
Other Decks in Technology
See All in Technology
マルチドライブアーキテクチャ: 複数の駆動力でプロダクトを前進させる
knih
0
10k
新しい風。SolidFlutterで実現するシンプルな状態管理
zozotech
PRO
0
140
AI駆動開発を実現するためのアーキテクチャと取り組み
baseballyama
17
13k
ABEMAのCM配信を支えるスケーラブルな分散カウンタの実装
hono0130
4
1.1k
単一Kubernetesクラスタで実現する AI/ML 向けクラウドサービス
pfn
PRO
1
370
ローカルVLM OCRモデル + Gemini 3.0 Proで日本語性能を試す
gotalab555
1
170
ABEJA FIRST GUIDE for Software Engineers
abeja
0
3.2k
2025 DORA Reportから読み解く!AIが映し出す、成果を出し続ける組織の共通点 #開発生産性_findy
takabow
0
130
The Complete Android UI Testing Landscape: From Journey to Traditional Approaches
alexzhukovich
1
120
信頼性が求められる業務のAIAgentのアーキテクチャ設計の勘所と課題
miyatakoji
0
160
Progressive Deliveryで支える!スケールする衛星コンステレーションの地上システム運用 / Ground Station Operation for Scalable Satellite Constellation by Progressive Delivery
iselegant
1
220
都市スケールAR制作で気をつけること
segur
0
200
Featured
See All Featured
CoffeeScript is Beautiful & I Never Want to Write Plain JavaScript Again
sstephenson
162
15k
Writing Fast Ruby
sferik
630
62k
ピンチをチャンスに:未来をつくるプロダクトロードマップ #pmconf2020
aki_iinuma
127
54k
How Fast Is Fast Enough? [PerfNow 2025]
tammyeverts
3
350
Code Reviewing Like a Champion
maltzj
527
40k
Building Better People: How to give real-time feedback that sticks.
wjessup
370
20k
The Power of CSS Pseudo Elements
geoffreycrofte
80
6.1k
Git: the NoSQL Database
bkeepers
PRO
432
66k
Making the Leap to Tech Lead
cromwellryan
135
9.6k
CSS Pre-Processors: Stylus, Less & Sass
bermonpainter
359
30k
4 Signs Your Business is Dying
shpigford
186
22k
Imperfection Machines: The Place of Print at Facebook
scottboms
269
13k
Transcript
Introducing Function Builder potatotips #267 2019/12/17
Akihisa Sengoku @akihisasen גࣜձࣾαΠόʔΤʔδΣϯτ AmebaʢΞϝʔόʣ iOSΤϯδχΞ
Function Builderͱʁ
4XJGU6*ͰΘΕ͍ͯΔΫϩʔδϟʔతͳͷʁ
%4-Λॻ͘͜ͱ͕Ͱ͖ΔΑ͏ʹͳͬͨʁ
4XJGUͰՃ͞Εͨ৽ػೳ 1SPQPTBM 'PSVN
BuilderͷϧʔϧʹैͬͯؔΛ ҉తʹม͢Δ͜ͱ͕Ͱ͖Δ #VJMEFSΛ దԠͨؔ͠ #VJMEFSϧʔϧʹ Ԡͯؔ͡Λม #VJMEFSΛఆٛ #VJMEFSΛ దԠ
None
None
Function BuilderʹΑΓ ಠࣗͷDSLΛΑΓ࡞͘͢͠ͳͬͨ - Structure Data (json, XML) - UI
View Hierarchies - HTML DOM Hierarchies
࡞Γํ!
#VJMEFSͷ࡞ํ๏ʹ͍ͭͯ
Builderͷ࡞ํ๏ 1. struct or classͷલʹ`@_functionBuilder`Λ͚ͭͯ ఆٛ͢Δɻ 2. static func Ͱ
`buildBlock(_ components: Component...) -> Component` Λఆٛ͢Δɻ
ͦͷଞͷbuildͷ࣮ • buildExpression(_ expression: Expression) -> Component • buildFunction(_ components:
Component...) - > Return • buildDo(_ components: Component...) -> Component • buildOptional(_ component: Component?) -> Component
'VODUJPO#VJMEFSͷ༻ํ๏
Function Builderͷ༻ํ๏ 1. Function BuilderΛ༻͍ͨؔ͠ͷલʹ @FunctionBuilder໊Λ͚ͭΔ 2. BuilderͷbuildBlockʹରԠ͢ΔҾΛɺ վߦ۠ΓͰهड़
ؔͷҾͷΫϩʔδϟͰFunction Builder Λ༻͢Δ͜ͱ͕Ͱ͖Δ
None
ϓϩμΫτಋೖ
SwiftUI HTML NSAttributedString Network UIKit ϓϩμΫτಋೖ: DSL
Amebaͷಋೖྫ NSAttributedStringͷIFΛ៉ྷʹ 5JQT
What's New in Swift - WWDC2019 https://developer.apple.com/videos/play/ wwdc2019/402/ Function Builder
- swift-evolution https://github.com/apple/swift-evolution/blob/ 9992cf3c11c2d5e0ea20bee98657d93902d5b17 4/proposals/XXXX-function-builders.md