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
850
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.9k
Flutter Accessibility
akihisasengoku
1
690
組織作りで大切にしていること
akihisasengoku
0
120
Bitriseのリファクタリング
akihisasengoku
1
340
Awaiting for New UI in iOS 13
akihisasengoku
0
1.5k
RxSwiftのテスト入門
akihisasengoku
1
1.1k
Other Decks in Technology
See All in Technology
たかがボタン、されどボタン ~button要素から深ぼるボタンUIの定義について~ / BuriKaigi 2026
yamanoku
1
250
Qiita Bash アドカレ LT #1
okaru
0
190
I tried making a solo advent calendar!
zzzzico
0
150
RALGO : AIを組織に組み込む方法 -アルゴリズム中心組織設計- #RSGT2026 / RALGO: How to Integrate AI into an Organization – Algorithm-Centric Organizational Design
kyonmm
PRO
3
1.1k
投資戦略を量産せよ 2 - マケデコセミナー(2025/12/26)
gamella
1
640
All About Sansan – for New Global Engineers
sansan33
PRO
1
1.3k
Claude Codeを使った情報整理術
knishioka
20
12k
AI Agent Standards and Protocols: a Walkthrough of MCP, A2A, and more...
glaforge
0
190
2025年 山梨の技術コミュニティを振り返る
yuukis
0
160
Node vs Deno vs Bun 〜推しランタイムを見つけよう〜
kamekyame
1
430
AI Agent Agentic Workflow の可観測性 / Observability of AI Agent Agentic Workflow
yuzujoe
0
220
2025年の医用画像AI/AI×medical_imaging_in_2025_generated_by_AI
tdys13
0
330
Featured
See All Featured
How to optimise 3,500 product descriptions for ecommerce in one day using ChatGPT
katarinadahlin
PRO
0
3.4k
The Web Performance Landscape in 2024 [PerfNow 2024]
tammyeverts
12
1k
No one is an island. Learnings from fostering a developers community.
thoeni
21
3.6k
Build The Right Thing And Hit Your Dates
maggiecrowley
38
3k
What does AI have to do with Human Rights?
axbom
PRO
0
1.9k
Between Models and Reality
mayunak
1
160
Why Your Marketing Sucks and What You Can Do About It - Sophie Logan
marketingsoph
0
55
Why Our Code Smells
bkeepers
PRO
340
58k
Introduction to Domain-Driven Design and Collaborative software design
baasie
1
540
Let's Do A Bunch of Simple Stuff to Make Websites Faster
chriscoyier
508
140k
Bridging the Design Gap: How Collaborative Modelling removes blockers to flow between stakeholders and teams @FastFlow conf
baasie
0
430
The Psychology of Web Performance [Beyond Tellerrand 2023]
tammyeverts
49
3.3k
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