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
57
Swift 雙週報 2016/2/23
Johnlin
February 23, 2016
Tweet
Share
More Decks by Johnlin
See All by Johnlin
Unearth Ruby builtin Gems 發掘 Ruby 的內建 Gems
johnlinvc
0
110
Ruby 型別檢查工具簡介
johnlinvc
0
310
Swift Actor 實作探索
johnlinvc
0
130
用 mruby 來寫跨平台工具
johnlinvc
0
49
Actor model 簡介
johnlinvc
0
120
一起玩 Helm 3
johnlinvc
1
82
為什麼 App 卡卡的
johnlinvc
2
1k
如何使用 byebug 來除錯 Ruby 程式
johnlinvc
0
130
Life of a Cell
johnlinvc
0
1.3k
Other Decks in Programming
See All in Programming
Elm 0.19.0 Changes
bkuhlmann
0
480
Rails と人魚の話/rails-and-mermaid
sanfrecce_osaka
0
100
ADRを一年運用してみた/adr_after_a_year
hanhan1978
7
2.2k
脱・初心者!脱・マネコン!AWS CDKを使ってみませんか!?
har1101
0
300
StoreKit2によるiOSのアプリ内課金のリニューアル
kangnux
0
100
大規模Reactアプリのリアーキテクチャ~8万行のTanStack Query移行の軌跡~
kj455
3
740
本格ローグライク制作にEbitengineを選んでみた
nagainaganawa
0
290
OpenTelemetry のサービスという概念について
azukiazusa1
2
1.1k
SwiftUI Performance 不要なViewの再描画と更新を抑える
bigamitiongit
1
160
What We Can Learn From OSS
inouehi
0
400
puregoの活用例
aethiopicuschan
0
220
HUIT新歓2024「競技プログラミング、やってみませんか?」
slephy2784
1
250
Featured
See All Featured
Java REST API Framework Comparison - PWX 2021
mraible
PRO
18
6.9k
Designing the Hi-DPI Web
ddemaree
276
33k
I Don’t Have Time: Getting Over the Fear to Launch Your Podcast
jcasabona
20
1.6k
Become a Pro
speakerdeck
PRO
10
4.5k
Writing Fast Ruby
sferik
620
60k
[Rails World 2023 - Day 1 Closing Keynote] - The Magic of Rails
eileencodes
1
1.3k
Mobile First: as difficult as doing things right
swwweet
216
8.6k
Documentation Writing (for coders)
carmenintech
59
3.9k
Creating an realtime collaboration tool: Agile Flush - .NET Oxford
marcduiker
13
1.5k
Understanding Cognitive Biases in Performance Measurement
bluesmoon
6
990
The Language of Interfaces
destraynor
151
23k
What's new in Ruby 2.0
geeforr
337
31k
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
清單