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
390
Unearth Ruby builtin Gems 發掘 Ruby 的內建 Gems
johnlinvc
0
490
Ruby 型別檢查工具簡介
johnlinvc
0
700
Swift Actor 實作探索
johnlinvc
0
230
用 mruby 來寫跨平台工具
johnlinvc
0
150
Actor model 簡介
johnlinvc
0
280
一起玩 Helm 3
johnlinvc
1
200
為什麼 App 卡卡的
johnlinvc
2
1.4k
如何使用 byebug 來除錯 Ruby 程式
johnlinvc
0
300
Other Decks in Programming
See All in Programming
S3 TablesのIcebergデータに、AIエージェントからアクセスしてみた / 20261016developersio2026joetsu-accessing-iceberg-in-s3tables-via-agent
kasacchiful
PRO
0
140
[ハンズオン]AIへの指示だけで「五目並べ」を作ってみよう
satoshi256kbyte
1
380
C#の現在地 進化の歴史と、AI時代の.NET Everywhere
neuecc
5
5.2k
sbt 2.0: takeoff
eed3si9n
0
160
ソニーのクラウド共通基盤の変遷とAI時代の開発スタイルに合わせた進化 / The Journey of Sony’s Common Cloud Platform and Its Evolution for AI-Native Development
kenjiyoneyama
0
270
AIで開発が速くなった先で、開発チームは何を目指すか
shihochan
0
530
Unity6 URPによる海底をテーマにしたVJシステムの解説 | Unity Shader 完全に理解した 勉強会
gam0022
0
370
なぜCTOを降りてFDEを選んだのか?〜なぜプロダクト企業がFDEで顧客の現場に踏み込むのか〜
gonta
1
200
ジョジョの世界をXRで再現する
mofurune
0
160
設計次第でAIコードの読む量は減らせる / designing-for-code-reading
minodriven
35
16k
全ての永続トークンを、生まれる前に消し去りたい!
sylph01
2
810
SREの越境 / SRE Collaboration
y0hgi
2
310
Featured
See All Featured
A brief & incomplete history of UX Design for the World Wide Web: 1989–2019
jct
2
530
Designing Experiences People Love
moore
143
24k
Testing 201, or: Great Expectations
jmmastey
46
8.3k
Jamie Indigo - Trashchat’s Guide to Black Boxes: Technical SEO Tactics for LLMs
techseoconnect
PRO
0
710
Evolving SEO for Evolving Search Engines
ryanjones
0
330
Music & Morning Musume
bryan
48
7.4k
Agile that works and the tools we love
rasmusluckow
331
22k
WENDY [Excerpt]
tessaabrams
14
40k
We Analyzed 250 Million AI Search Results: Here's What I Found
joshbly
2
2k
The Invisible Side of Design
smashingmag
301
52k
Thoughts on Productivity
jonyablonski
76
5.4k
Lightning Talk: Beautiful Slides for Beginners
inesmontani
PRO
2
730
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