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
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
420
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
AI × TiDD / 2026.09.05 Redmine 大阪
tokudiro
1
170
Are APIs Still Relevant in the AI Era?
soyuka
0
230
アクセシビリティから考える情報設計
high_g_engineer
0
380
マイコン向けの軽量Ruby「PicoRuby」で各種デバイスを制御するネイティブアプリの実現手法
bash0c7
0
410
How I Stole PSI from Android Studio - DroidKaigi2026
worker8
0
130
GraphRAGのKnowledge Graphを 直接!見る/View-GraphRAG's-KnowledgeGraph-directly!
tyumugi1113
1
330
[GoCon2026] When Goroutines Are Not Enough: Runtime Locality in High-Throughput Go
takehaya
6
2.3k
速く作れる。その次は、速く確かめられる開発へ 〜AIネイティブ開発を支える、Shift Down〜 / Can build fast. Next, moving to development where we can verify fast.
rkaga
4
3.1k
Security issues being discussed on Web Platforms
petamoriken
0
950
The Good Stuff, Not the Slop: Engineering High-Quality Android Apps with Modern AI Tooling
danybony
1
250
Intent as Code
shoppingjaws
6
1k
TiDB Cloudのカスタムコントローラーによるオートスケール対応
takaidohigasi
0
120
Featured
See All Featured
Building Adaptive Systems
keathley
44
3.2k
Building Flexible Design Systems
yeseniaperezcruz
330
41k
Site-Speed That Sticks
csswizardry
13
1.5k
Jess Joyce - The Pitfalls of Following Frameworks
techseoconnect
PRO
1
410
Facilitating Awesome Meetings
lara
57
7.1k
svc-hook: hooking system calls on ARM64 by binary rewriting
retrage
2
580
Are puppies a ranking factor?
jonoalderson
2
3.9k
Agile Actions for Facilitating Distributed Teams - ADO2019
mkilby
0
280
How to build a perfect <img>
jonoalderson
1
6k
For a Future-Friendly Web
brad_frost
183
10k
HTML-Aware ERB: The Path to Reactive Rendering @ RubyCon 2026, Rimini, Italy
marcoroth
5
660
We Are The Robots
honzajavorek
0
380
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