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
展望 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
290
Unearth Ruby builtin Gems 發掘 Ruby 的內建 Gems
johnlinvc
0
370
Ruby 型別檢查工具簡介
johnlinvc
0
610
Swift Actor 實作探索
johnlinvc
0
200
用 mruby 來寫跨平台工具
johnlinvc
0
120
Actor model 簡介
johnlinvc
0
240
一起玩 Helm 3
johnlinvc
1
160
為什麼 App 卡卡的
johnlinvc
2
1.3k
如何使用 byebug 來除錯 Ruby 程式
johnlinvc
0
260
Other Decks in Programming
See All in Programming
Snowflake Summitでの新機能 CoCo / CoWork / snowflake-summit-2026-overall-what-new-coco
tatsuhiro
1
110
The ROI of Quarkus for Spring Boot Applications
hollycummins
0
110
並列実装の現場、2ヶ月間実務でAIを使い倒したAIもPCも私も限界が近い
ming_ayami
0
130
ADKを使って簡単にAIエージェントを作ってみよう
k1mu21
0
260
Java × distroless で 軽量なコンテナイメージを / Java on Distroless
contour_gara
0
540
例外の正しい扱い方 そのエラー try-catchして大丈夫?
jinwatanabe
0
220
Observability in Practice:Grafana 與 Edge Device SRE 的那些事
blueswen
0
160
ECSアプリログをFireLensでコスト削減しようとしたけど諦めた話 in Fargate×Node.js
akihisaikeda
2
4k
過去最大のMCPアップデート! 2026-07-28 RC版の謎に迫る
licux
6
260
LLMによるContent Moderationの本番運用の裏側と品質担保への挑戦
suikabar
2
600
OSもどきOS
arkw
0
550
ローカルLLMでどこまでコードが書けるか -拡張版 / How much code can be written on a local LLM Extended
kishida
10
3.5k
Featured
See All Featured
Building a Modern Day E-commerce SEO Strategy
aleyda
45
9.1k
How to Think Like a Performance Engineer
csswizardry
28
2.6k
Faster Mobile Websites
deanohume
310
31k
Lessons Learnt from Crawling 1000+ Websites
charlesmeaden
PRO
1
1.3k
The SEO Collaboration Effect
kristinabergwall1
1
480
コードの90%をAIが書く世界で何が待っているのか / What awaits us in a world where 90% of the code is written by AI
rkaga
62
44k
A Tale of Four Properties
chriscoyier
163
24k
XXLCSS - How to scale CSS and keep your sanity
sugarenia
250
1.3M
Digital Projects Gone Horribly Wrong (And the UX Pros Who Still Save the Day) - Dean Schuster
uxyall
1
1.7k
Site-Speed That Sticks
csswizardry
13
1.2k
How Software Deployment tools have changed in the past 20 years
geshan
0
34k
The Limits of Empathy - UXLibs8
cassininazir
1
360
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