Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Sign up for free
Menu
Search
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Pricing
Search
Sign in
Sign up for free
エラーと警告で コードをデザインする ~赤と黄の輪舞曲~
Search
Yuka Ezura
August 20, 2016
Technology
4.4k
6
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
エラーと警告で コードをデザインする ~赤と黄の輪舞曲~
iosdc での発表資料です
Yuka Ezura
August 20, 2016
More Decks by Yuka Ezura
See All by Yuka Ezura
Mastering share sheet preview
ezura
4
1.5k
SF Symbols
ezura
9
1.5k
気遣いの iOS プログラミング
ezura
11
3.8k
Secret Swift tour
ezura
7
3.1k
Swift Album ver.4.1
ezura
3
1.6k
Swift と Kotlin
ezura
4
3k
哲学とSwiftの発表
ezura
5
660
アプリが動いたその先へ (iOS アプリ開発編)
ezura
1
1.2k
Blending Kotlin's culture into Swift
ezura
1
1.4k
Other Decks in Technology
See All in Technology
越境するなら専門用語を使うな高校校歌 / If you wanna cross border, you shouldn't use jargon
vtryo
0
140
現場で役立つ技術負債の効果的な返済方法
masuda220
PRO
8
4.1k
ユーザー価値を届け続けるためにウォンテッドリーが大切にしている文化
kotaminato
0
160
10分で知る最近のOmarchy
komagata
0
320
AI 時代のスタートアップエコシステ厶から考究する技術的負債との向き合い方
m3m0r7
PRO
2
2.1k
幾何アルゴリズムで なめらかなピン操作を / iOSDC Japan 2026 / smoothpin
kazumanagano
0
350
beyond jj: config & tools ecosystem
indirect
0
430
Claude Codeを「使うほど育つ」AI秘書にするノウハウ
minorun365
PRO
27
22k
技術的負債から考える、AI時代のエンジニアリング投資 — ビズリーチの技術的負債と向き合った経験から、変更し続けられるソフトウェアを考える/ technical-debt-con2026
visional_engineering_and_design
3
2.9k
映像変換サーバーなしで端末内でHLSを生成してライブ配信
hikarusato
0
110
Slack上でインフラをトラブルシュートする! Agentic Platform Engineeringの第一歩
teru0x1
4
1.7k
AIによるクリエイティブ生成を行う上での試行錯誤
plaidtech
PRO
0
150
Featured
See All Featured
Building a Scalable Design System with Sketch
lauravandoore
464
34k
Building Experiences: Design Systems, User Experience, and Full Site Editing
marktimemedia
1
610
The Director’s Chair: Orchestrating AI for Truly Effective Learning
tmiket
1
300
Building Adaptive Systems
keathley
44
3.2k
Game over? The fight for quality and originality in the time of robots
wayneb77
1
280
HU Berlin: Industrial-Strength Natural Language Processing with spaCy and Prodigy
inesmontani
PRO
0
700
ラッコキーワード サービス紹介資料
rakko
1
4.9M
AI: The stuff that nobody shows you
jnunemaker
PRO
10
1k
Google's AI Overviews - The New Search
badams
0
1.6k
sira's awesome portfolio website redesign presentation
elsirapls
0
410
The Pragmatic Product Professional
lauravandoore
37
7.4k
Embracing the Ebb and Flow
colly
88
5.2k
Transcript
έϮ⑲ͺຓ θ⑲ώΤόλΩϸͫΝ _᧬ͺԫᇷዛູ_ 2016/8/20 ezura
FSSPS͜ṽͫ͟͝Ħ
XBSOJOH͜ṽͫ͟͝Ħ
None
None
None
Δͩ͘ͼΛj
Δ͵ͺ᪇͡ ཱͺᲇձ͖ͱ͝͵ͱj
ဒᘥ ࣮ḝ ᙉණ
͟ΝĈ ᦉᷯΔ͔Ν
࣮ḝ᧸ͽុΜΤ᧬ͺԫᓸ ᓸͣΑΐͩΙ͘
έϮ⑲ͺຓ θ⑲ώΤόλΩϸͫΝ _᧬ͺԫᇷዛູ_
↟1IBOUPN5ZQF ↟%FDMBSBUJPO"UUSJCVUFT
$BTF
class HogeOperation { /// Ұ͚ͩݺͿ͜ͱ func prepare() /// prepare ޙ͔Β͑Δ
func execute() /// ͍ͭݺΜͰྑ͍ func mob() }
/// Ұ͚ͩݺͿ͜ͱ /// prepare ޙ͔Β͑Δ
private var isPrepared = false /// Ұ͚ͩݺͿ͜ͱ func prepare() {
guard !isPrepared else { fatalError("prepare() Λෳݺͳ͍͜ͱ") } isPrepared = true }
None
None
όλΩϸͩΚ͘Ĉ
1IBOUPN5ZQF ܕใΛར༻ͯ͠ॲཧͷޡΓΛࢦఠՄೳʹ
ᴰᨷঢ়ỪΑ ᑿᠭ൱ၙͼϦςψώΤᨷᤅ
protocol OperationState {} class Init: OperationState {} class Prepared: OperationState
{}
class HogeOperation<State: OperationState> {}
extension HogeOperation where State: Init { /// Ұ͚ͩݺͿ͜ͱ func prepared()
-> HogeOperation<Prepared> { let readyOp = HogeOperation<Prepared>() // TODO: ඞཁͳσʔλΛҾ͖ܧ͗ return readyOp } }
θϸϖΩϰέϮ⑲ ỹ ỹ
None
extension HogeOperation where State: Prepared { /// prepare ΛݺΜͩޙ͔Β༻Մೳ func
execute() { /* do somethig */ } }
θϸϖΩϰέϮ⑲
ଓ͟8FC https://gist.github.com/ezura/ f5aebef7bb86edbfd40b0bd1d0435e00
1IBOUPN5ZQF͖Ο͖Ο ↟ 'VODUJPOBM4OJQQFU1IBOUPN5ZQFT ↟ 4XJGU.POFZXJUI1IBOUPN5ZQFT ↟ 4XJGU1IBOUPN5ZQF ྶṞ ↟
1IBOUPN5ZQFθϸϖΩϰᙉͽঢ়ᴋφάψδͫΝ TIJCVZBTXJGU ↑ ঢ়ଶભҠΛ៉ྷʹදݱ͍ͯͯ͠ײಈ
$BTF
/// ΘΓʹ fuga Λ͏͜ͱʂ func hoge() { … }
όλΩϸͩΚ͘Ĉ
%FDMBSBUJPO "UUSJCVUFT ใΛ༩
/// ΘΓʹ fuga() Λ͏͜ͱʂ @available(*, unavailable, message="͓ޚ໔͞…(ƅωƅ)", renamed="fuga") func hoge()
{ … }
/// ΘΓʹ fuga() Λ͏͜ͱʂ @available(*, unavailable, message="͓ޚ໔͞…(ƅωƅ)", renamed="fuga") func hoge()
{ … }
/// ΘΓʹ fuga() Λ͏͜ͱʂ @available(iOS, deprecated=1, message="͓ޚ໔͞…(ƅωƅ)", renamed="fuga") func hoge()
{ … }
ᬋණ ↟ !BWBJMBCMF ↟ !EJTDBSEBCMF3FTVMU 4XJGU͝Λ ↟ !XBSO@VOVTFE@SFTVMU 4XJGUഇᬬ
: Swift3 ͔ΒҰ෦༷͕มߋ͞Ε·͢
ᓸͣ ͖ͣͯͫ͘͝Ħ
ͦਗ਼ௌ͔Μ͞ͺ͖ͦͨ͘ΐͩͱĈ