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
展望 Swift 4
Search
Sponsored
·
Your Podcast. Everywhere. Effortlessly.
Share. Educate. Inspire. Entertain. You do you. We'll handle the rest.
→
Johnlin
August 16, 2016
Programming
130
1
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
展望 Swift 4
Johnlin
August 16, 2016
More Decks by Johnlin
See All by Johnlin
用 MLIR 實作 一個 Ruby IR (intermediate representation)
johnlinvc
0
340
Unearth Ruby builtin Gems 發掘 Ruby 的內建 Gems
johnlinvc
0
430
Ruby 型別檢查工具簡介
johnlinvc
0
640
Swift Actor 實作探索
johnlinvc
0
210
用 mruby 來寫跨平台工具
johnlinvc
0
130
Actor model 簡介
johnlinvc
0
250
一起玩 Helm 3
johnlinvc
1
170
為什麼 App 卡卡的
johnlinvc
2
1.3k
如何使用 byebug 來除錯 Ruby 程式
johnlinvc
0
280
Other Decks in Programming
See All in Programming
Vue Fes Japan 2026 タイムテーブル徹底解説
448jp
1
250
GraphRAGのKnowledge Graphを 直接!見る/View-GraphRAG's-KnowledgeGraph-directly!
tyumugi1113
1
350
WebMCP Challenge に星空観察アプリで参加した話
okajun35
0
180
仕様駆動開発による爆速プロダクト開発 / Bakusoku Spec Driven Development
kobakei
0
120
速く作れる。その次は、速く確かめられる開発へ 〜AIネイティブ開発を支える、Shift Down〜 / Can build fast. Next, moving to development where we can verify fast.
rkaga
5
3.4k
【高い買い物LT会】初任給で話題の国産フィジカルAIを買った話
akagami
PRO
0
160
Go × SIMDで高速化するベクトル検索 ~ルーフラインモデルでSIMDが効く境界を探れ! ~
po3rin
1
2k
App Storeの外へ──日本のiOSサイドローディング入門 for iOSDC Japan 2026
yuukiw00w
0
220
App Intentsのビルドプロセスを支える技術
kntkymt
0
400
Augmenting AI with the Power of Jakarta EE
ivargrimstad
0
210
Jetpack Compose メカニズム
skydoves
0
450
アクセシビリティから考える情報設計
high_g_engineer
0
380
Featured
See All Featured
The browser strikes back
jonoalderson
0
1.7k
Stewardship and Sustainability of Urban and Community Forests
pwiseman
0
530
Navigating Algorithm Shifts & AI Overviews - #SMXNext
aleyda
1
1.6k
Faster Mobile Websites
deanohume
310
32k
Code Reviewing Like a Champion
maltzj
528
40k
Ruling the World: When Life Gets Gamed
codingconduct
0
340
The Anti-SEO Checklist Checklist. Pubcon Cyber Week
ryanjones
0
250
Bootstrapping a Software Product
garrettdimon
PRO
306
120k
Ethics towards AI in product and experience design
skipperchong
2
380
Mozcon NYC 2025: Stop Losing SEO Traffic
samtorres
1
550
The innovator’s Mindset - Leading Through an Era of Exponential Change - McGill University 2025
jdejongh
PRO
1
340
The Myth of the Modular Monolith - Day 2 Keynote - Rails World 2024
eileencodes
28
3.6k
Transcript
ల Swift 4 John Lin @johnlinvc
ճސSwift 3 • Swift 3 ။ੋҰݸత൛ຊɻ • ౸લҰڞ༗88 ݸमվɻ
Open source ඇৗ • ೳⴺᡉू༗࠽ೳత֤Ґ • ᦒવਐఔຫɼୠੋೳ㗞ग़ߴ࣭త݁Ռ
[։ݯ]ೈᱪ࣌ఔ༬ဟ • • ༗Ұࠣඪᔒ༗ୡ • ඪෆੋঝɼᔒୡՄҎࡏྗ
ᡉযࡏॏᴍ • ༗త࣌ީଠଟࣄᚙੜɼᔒ㭎๏ಉ᮫࣌
धཁ໌֬తඪ • Ұ։࢝(12݄౸1݄) Swift 3 ᔒ༗໌֬తඪɻ • ޙိ༗໌֬తඪޙࣄबॱརଟྃ
ෆՄೳᩋ㑌ݸਓ։৺ • 㑌ݸܾఆ༗ࠣਓتᓣɼ༗ࠣਓෆتᓣɻ • แؚࣄతઌޙॱংɼੋ൱धཁࠣޭೳ • https://github.com/apple/swift-evolution/blob/ master/commonly_proposed.md
։ᚙܭᙘ • 2016 : Swift 3.0 • 2017 य़ఱ: Swift
3.x • 2017 ळఱ: Swift 4 • ଖத။ἥᎎ bugfix release ૾ੋ 3.0.1
Swift 4 • Swift 4 ሡ။ၷݸ։ᚙ֊ஈ
ୈҰ֊ஈ • ሢࡏఔࣜᛰ ABI తᜦఆɻ؆ᄸိ㘸बੋ૬༰ ੑɻ • Ṝݸඪແ᮫తෆ။ඃߟྀɻ • ༗Ұࠣىိແ᮫ɼୠੋఈመ࡞༗᮫త။ඃߟ
ྀɻ ൺํ㘸 conditional conformanceɻ • େ֓။၏౸໌य़ఱ
Conditional Conformance extension Array : Equatable where Element : Equatable
{ } func ==<T : Equatable>(lhs: Array<T>, rhs: Array<T>) -> Bool { ... }
ୈҰ֊ஈ • ሢࡏఔࣜᛰ ABI తᜦఆɻ؆ᄸိ㘸बੋ૬༰ ੑɻ • Ṝݸඪແ᮫తෆ။ඃߟྀɻ • ༗Ұࠣىိແ᮫ɼୠੋఈመ࡞༗᮫త။ඃߟ
ྀɻ ൺํ㘸 conditional conformanceɻ • େ֓။၏౸໌य़ఱ
ఔࣜᛰ૬༰ੑ • ᩋ࠷৽త Compiler Լ૬༰ɻ • ⃧ՃҰݸྨࣅ -std=swift3 ṜҰྨత Compiler
બ ߲ɻ • ࢧԉመᱛੑޭೳతతબ߲ɼ૾ੋ -fcool-new-feature
ఔࣜᛰత䧬ੑ • ආ໔ఔࣜҼҝ API վᏓࣕᆦᎃ • ᩋSwift త API ՄҎ༗ԋԽతػ။
• ൺํ㘸ආ໔ fragile base class ɻ
Fragile Base Class class Foo{ func p(str:String){ print(str) } }
class Bar : Foo{ func log(str:String){ p(str: str) } }
Fragile Base Class class Foo{ func p(str:String){ //print(str) //ෆཁ౸႔စ print
} } class Bar : Foo{ func log(str:String){ p(str: str) } }
Fragile Base Class class Foo{ func p(str:String){ //print(str) //ෆཁ౸႔စ print
} } class Bar : Foo{ func log(str:String){ p(str: str) // } }
ආ໔ Fragile Base Class • ༻ private, internal, public, open,
final ᮫伴ࣈ • ༗ଧࢉඃਓঝతClass ࠽֘ඃঝɻ
ABI मվ • 㗞ੜ bytecode త෦༗ଟࡉઅཁमվɻ • ෆӨڹҰൠUserɻ
վਐ Generic • ࢧԉ Conditional Conformance Recursive protocol constraintsɻ
• Ҏٴଖሏ ABI ༗᮫తमվɻ
Recursive protocol constrains protocol Tree{ associatedtype Child : Tree }
ߋతString • String ඇৗॏཁɻ • ቮៃ༗ଟमվత๏ • ඪੋൺ Perl ߋత
String processing!
Memory Ownership model • อཹARC, ⃧ՃҰݸֹ֎૾Rustత ownership modelɻ • ᩋ
Swift ༗ߋೳⴺ༬ଌతᏈೳɻ • ။େ෯मվABI, Type Systemɻ
ୈೋ֊ஈ • ࣄॱརతؐ༗࣌ؒ၏ଖଞతॏཁޭೳ • ༗ଟೳ၏తɼෆաॱং౸࣌ި࠽။ܾఆɻ
Reflection • ቮៃ༗େ෦త data reflectionɼୠधཁ৽⃧༻త User APIɻ • धཁઃܭ৽త method
reflection runtime API
First Class Concurrency • Actor, async/await, atomic ೭ྨత • 㑌ݸਓཁ
• ೭ޙ။త౼ɼෆաSwift 4 ग़ိલጯ֘၏ෆ ɻ
վਐ Generic • ABI ᔒ᮫త෦ɻ • ᩋ Swift Generic ߋڧେɻ
ᜦఆ .swiftmodule • ࡏṜ೭લཁઌ༗ᜦఆత ABI
Scripting ޭೳ • ਖ਼نදࣔࣜ , ଟߦతString • ෆሜscript తਓཁɼ၏Web
తਓཁ
Property తߦҝ • ᩋProperty ߋ༻ɻൺํ㘸 observer ɼଟॏ accessor
ଖଞҰେଯ • Submodules • implicit promotions between numeric types
• importing C++ APIs • hygenic macro system • guaranteed tail calls • making enums enumerable • typed ‘throws’ • user defined attributes • abstract methods/classes • better SIMD support • ‘dynamic’ for non- at objc • data parallelism support • higher kinded types • ൟෆٴඋࡌ
Syntactic Sugar • ଟ • ࠷༏ઌ
݁ • Swift 4 ။ઌᜦఆ Source & ABI • ။༗৽త
Memory Model • Swift 3 ጯ֘ࠓळఱ။ग़
Q&A