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
Sponsored
·
SiteGround - Reliable hosting with speed, security, and support you can count on.
→
100059
December 17, 2019
Technology
870
3
Share
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
720
組織作りで大切にしていること
akihisasengoku
0
120
Bitriseのリファクタリング
akihisasengoku
1
360
Awaiting for New UI in iOS 13
akihisasengoku
0
1.5k
RxSwiftのテスト入門
akihisasengoku
1
1.2k
Other Decks in Technology
See All in Technology
Databricks Appsで実現する社内向けAIアプリ開発の効率化
r_miura
0
320
スケーリングを封じられたEC2を救いたい
senseofunity129
0
140
Babylon.js を使って試した色々な内容 / Various things I tried using Babylon.js / Babylon.js 勉強会 vol.5
you
PRO
0
240
スクラムを支える内部品質の話
iij_pr
0
270
ADOTで始めるサーバレスアーキテクチャのオブザーバビリティ
alchemy1115
2
160
Webアクセシビリティは“もしも”に備える設計
tomokusaba
0
160
BIツール「Omni」の紹介 @Snowflake中部UG
sagara
0
200
組織的なAI活用を阻む 最大のハードルは コンテキストデザインだった
ixbox
1
700
Cursor Subagentsはいいぞ
yug1224
2
140
【PHPカンファレンス小田原2026】Webアプリケーションエンジニアにも知ってほしい オブザーバビリティ の本質
fendo181
0
200
Network Firewall Proxyで 自前プロキシを消し去ることができるのか
gusandayo
0
190
Goビルドを理解し、 CI/CDの高速化に挑む
satoshin
0
130
Featured
See All Featured
B2B Lead Gen: Tactics, Traps & Triumph
marketingsoph
0
97
コードの90%をAIが書く世界で何が待っているのか / What awaits us in a world where 90% of the code is written by AI
rkaga
61
43k
Helping Users Find Their Own Way: Creating Modern Search Experiences
danielanewman
31
3.1k
Java REST API Framework Comparison - PWX 2021
mraible
34
9.2k
How Software Deployment tools have changed in the past 20 years
geshan
0
33k
Building Applications with DynamoDB
mza
96
7k
Improving Core Web Vitals using Speculation Rules API
sergeychernyshev
21
1.4k
The Pragmatic Product Professional
lauravandoore
37
7.2k
The SEO identity crisis: Don't let AI make you average
varn
0
430
DevOps and Value Stream Thinking: Enabling flow, efficiency and business value
helenjbeal
1
160
Deep Space Network (abreviated)
tonyrice
0
100
GitHub's CSS Performance
jonrohan
1032
470k
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