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
890
3
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
Introducing Function Builder
potatotips #267
2019/12/17
100059
December 17, 2019
More Decks by 100059
See All by 100059
アクセシビリティが高いFlutterアプリケーションを開発する
akihisasengoku
2
4k
Flutter Accessibility
akihisasengoku
1
740
組織作りで大切にしていること
akihisasengoku
0
150
Bitriseのリファクタリング
akihisasengoku
1
370
Awaiting for New UI in iOS 13
akihisasengoku
0
1.6k
RxSwiftのテスト入門
akihisasengoku
1
1.2k
Other Decks in Technology
See All in Technology
PostgreSQL 19 新機能概要 OSC Hokkaido 2026
nori_shinoda
0
150
アンオフィシャルな、オフィシャルからのお願い
wyamazak_devrel
0
140
iOS アプリの「これって不具合ですか?」を AI に調べてもらう
miichan
0
100
SONiCの統計情報を取得したい
sonic
0
230
アジャイルな経理と Claude Code と経営の未来
kawaguti
PRO
3
160
Kiroで書いた 設計書 が AI レビューの 採点基準 になる
ezaki
0
130
【セミナー資料】Claude Code をセキュアに使うための考え方と設定の勘どころ / Claude Code Webinar 20260616
masahirokawahara
2
420
攻撃者視点で考えるDetection Engineering
cryptopeg
3
2k
【2026年版】 ベクトル検索とEmbedding最前線
mocobeta
17
4.6k
SteampipeとExcel Power QueryでAWS構成定義書の作成を自動化する
jhashimoto
0
160
2026TECHFRESH畢業分享會 - Lightning Talk - 打造精準高效的 MCP 設計模式與測試實務
line_developers_tw
PRO
0
1.3k
iAEONの段階的リアーキテクト戦略 / iAEON's_Gradual_Re-architecture_Strategy
aeonpeople
0
230
Featured
See All Featured
Color Theory Basics | Prateek | Gurzu
gurzu
0
370
Chasing Engaging Ingredients in Design
codingconduct
0
220
VelocityConf: Rendering Performance Case Studies
addyosmani
333
25k
Why Your Marketing Sucks and What You Can Do About It - Sophie Logan
marketingsoph
0
170
How To Speak Unicorn (iThemes Webinar)
marktimemedia
1
490
AI: The stuff that nobody shows you
jnunemaker
PRO
8
720
Writing Fast Ruby
sferik
630
63k
Leveraging Curiosity to Care for An Aging Population
cassininazir
1
270
Reality Check: Gamification 10 Years Later
codingconduct
0
2.2k
Building a Scalable Design System with Sketch
lauravandoore
463
34k
Un-Boring Meetings
codingconduct
0
320
Between Models and Reality
mayunak
4
340
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