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
760
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.5k
Flutter Accessibility
akihisasengoku
1
610
組織作りで大切にしていること
akihisasengoku
0
88
Bitriseのリファクタリング
akihisasengoku
1
230
Awaiting for New UI in iOS 13
akihisasengoku
0
1.3k
RxSwiftのテスト入門
akihisasengoku
1
1k
Other Decks in Technology
See All in Technology
月間60万ユーザーを抱える 個人開発サービス「Walica」の 技術スタック変遷
miyachin
1
140
WantedlyでのKotlin Multiplatformの導入と課題 / Kotlin Multiplatform Implementation and Challenges at Wantedly
kubode
0
250
AIアプリケーション開発でAzure AI Searchを使いこなすためには
isidaitc
1
120
TSのコードをRustで書き直した話
askua
2
190
AWSの生成AIサービス Amazon Bedrock入門!(2025年1月版)
minorun365
PRO
7
470
生成AI × 旅行 LLMを活用した旅行プラン生成・チャットボット
kominet_ava
0
160
今年一年で頑張ること / What I will do my best this year
pauli
1
220
シフトライトなテスト活動を適切に行うことで、無理な開発をせず、過剰にテストせず、顧客をビックリさせないプロダクトを作り上げているお話 #RSGT2025 / Shift Right
nihonbuson
3
2.2k
#TRG24 / David Cuartielles / Post Open Source
tarugoconf
0
590
コロプラのオンボーディングを採用から語りたい
colopl
5
1.3k
Unsafe.BitCast のすゝめ。
nenonaninu
0
200
re:Invent2024 KeynoteのAmazon Q Developer考察
yusukeshimizu
1
150
Featured
See All Featured
Sharpening the Axe: The Primacy of Toolmaking
bcantrill
38
1.9k
A Modern Web Designer's Workflow
chriscoyier
693
190k
Designing Experiences People Love
moore
139
23k
実際に使うSQLの書き方 徹底解説 / pgcon21j-tutorial
soudai
173
51k
Code Reviewing Like a Champion
maltzj
521
39k
StorybookのUI Testing Handbookを読んだ
zakiyama
28
5.4k
Fashionably flexible responsive web design (full day workshop)
malarkey
406
66k
JavaScript: Past, Present, and Future - NDC Porto 2020
reverentgeek
47
5.1k
Faster Mobile Websites
deanohume
305
30k
The Success of Rails: Ensuring Growth for the Next 100 Years
eileencodes
44
7k
The Invisible Side of Design
smashingmag
299
50k
Product Roadmaps are Hard
iamctodd
PRO
50
11k
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