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 雙週報 2016/2/23
Search
Johnlin
February 23, 2016
Programming
0
63
Swift 雙週報 2016/2/23
Johnlin
February 23, 2016
Tweet
Share
More Decks by Johnlin
See All by Johnlin
用 MLIR 實作 一個 Ruby IR (intermediate representation)
johnlinvc
0
160
Unearth Ruby builtin Gems 發掘 Ruby 的內建 Gems
johnlinvc
0
280
Ruby 型別檢查工具簡介
johnlinvc
0
500
Swift Actor 實作探索
johnlinvc
0
160
用 mruby 來寫跨平台工具
johnlinvc
0
84
Actor model 簡介
johnlinvc
0
200
一起玩 Helm 3
johnlinvc
1
120
為什麼 App 卡卡的
johnlinvc
2
1.2k
如何使用 byebug 來除錯 Ruby 程式
johnlinvc
0
210
Other Decks in Programming
See All in Programming
開発生産性を上げるための生成AI活用術
starfish719
3
1.1k
Leading Effective Engineering Teams in the AI Era
addyosmani
6
440
kiroとCodexで最高のSpec駆動開発を!!数時間で web3ネイティブなミニゲームを作ってみたよ!
mashharuki
0
570
NixOS + Kubernetesで構築する自宅サーバーのすべて
ichi_h3
0
940
ソフトウェア設計の実践的な考え方
masuda220
PRO
4
590
Android16 Migration Stories ~Building a Pattern for Android OS upgrades~
reoandroider
0
110
10年もののAPIサーバーにおけるCI/CDの改善の奮闘
mbook
0
830
『毎日の移動』を支えるGoバックエンド内製開発
yutautsugi
2
250
Software Architecture
hschwentner
6
2.3k
Claude Agent SDK を使ってみよう
hyshu
0
890
Serena MCPのすすめ
wadakatu
4
1k
Devoxx BE - Local Development in the AI Era
kdubois
0
130
Featured
See All Featured
Six Lessons from altMBA
skipperchong
29
4k
Easily Structure & Communicate Ideas using Wireframe
afnizarnur
194
16k
Producing Creativity
orderedlist
PRO
347
40k
How To Stay Up To Date on Web Technology
chriscoyier
791
250k
The MySQL Ecosystem @ GitHub 2015
samlambert
251
13k
The Cost Of JavaScript in 2023
addyosmani
55
9k
Practical Orchestrator
shlominoach
190
11k
The World Runs on Bad Software
bkeepers
PRO
72
11k
XXLCSS - How to scale CSS and keep your sanity
sugarenia
248
1.3M
Performance Is Good for Brains [We Love Speed 2024]
tammyeverts
12
1.2k
Measuring & Analyzing Core Web Vitals
bluesmoon
9
620
"I'm Feeling Lucky" - Building Great Search Experiences for Today's Users (#IAC19)
danielanewman
230
22k
Transcript
Swift 雙週報 2016/2/23 John Lin @johnlinvc
From the Core - Interactive playground - 可以安裝 Swift Toolchain
到 ~/Library - 漸進式編譯 - Swift Benchmark Suit
Interactive Playground XCode 7.3 beta 3 後支援在playground 裡直接顯示UIViewController(iOS) 或是 NSViewController
(OSX) import XCPlayground XCPlaygroundPage.currentPage.liveView = tableVC
可以安裝 Swift Toolchain 到 ~/Library 在2016/1/25 號之後的Swift Toolchain 可以安裝到~/Library 在安裝的時候選擇Install
for me only 就可以了
漸進式編譯 加快編譯速度10-20%
Swift Benchmark Suite 用來測試和比較不同Swift版本之間的性能 $ ./Benchmark_O --num-iters=1 --num-samples=1
Evolution - SE-0022 使用Swift Function 來建立 Obj-C selector - SE-0028
更像Swift 的Debugging Identifier - SE-0029 移除Function的自動Tuple Splat
SE-0022 使用Swift Function 來建立 Obj-C selector 過去要建立Obj-C selector 只能使用 Selector(“method:arg:”)
現在可以用下面的方法來建立 selector #selector(MyClass.method(_:arg:))
SE-0028 更像Swift 的Debugging Identifier Debug 用的符號將會改名 __FILE__ -> #file __LINE__
-> #line __COLUMN__ -> #column __FUNCTION__ -> #function __DSO_HANDLE__ -> #dsohandle print(__FILE__) # /var/folders/xz/8p5cjp3d1zg7d791vwlcwhcw0000gn/T/lldb/50190/playground43. swift
SE-0029 移除Function的自動Tuple Splat 將會移除下面這個不為人知的Function 用法 func foo(a:Int, b:Int)->Int{return b} let
t = (3,b:2) foo(t) # 2 只能用 foo(t.0, b: t.b) 但不影響沒有 Label 的 function func bar(a:Int, _ b:Int)->Int{return b} let q = (2,2) bar(q)
Community - Hirundo:讓你更容易Track Swift mailing list - swift.pm swift package
清單