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
67
0
Share
Swift 雙週報 2016/2/23
Johnlin
February 23, 2016
More Decks by Johnlin
See All by Johnlin
用 MLIR 實作 一個 Ruby IR (intermediate representation)
johnlinvc
0
260
Unearth Ruby builtin Gems 發掘 Ruby 的內建 Gems
johnlinvc
0
340
Ruby 型別檢查工具簡介
johnlinvc
0
570
Swift Actor 實作探索
johnlinvc
0
190
用 mruby 來寫跨平台工具
johnlinvc
0
110
Actor model 簡介
johnlinvc
0
230
一起玩 Helm 3
johnlinvc
1
150
為什麼 App 卡卡的
johnlinvc
2
1.3k
如何使用 byebug 來除錯 Ruby 程式
johnlinvc
0
240
Other Decks in Programming
See All in Programming
tRPCの概要と少しだけパフォーマンス
misoton665
2
220
運転動画を検索可能にする〜Cosmos-Embed1とDatabricks Vector Searchで〜/cosmos-embed1-databricks-vector-search
studio_graph
0
350
「話せることがない」を乗り越える 〜日常業務から登壇テーマをつくる思考法〜
shoheimitani
4
830
アーキテクチャモダナイゼーションとは何か
nwiizo
19
5.3k
事業会社でのセキュリティ長期インターンについて
masachikaura
0
260
10年分の技術的負債、完済へ ― Claude Code主導のAI駆動開発でスポーツブルを丸ごとリプレイスした話
takuya_houshima
0
2.6k
(Re)make Regexp in Ruby: Democratizing internals for the JIT
makenowjust
2
400
実践CRDT
tamadeveloper
0
580
Oxlintとeslint-plugin-react-hooks 明日から始められそう?
t6adev
0
270
レガシーPHP転生 〜父がドメインエキスパートだったのでDDD+Claude Codeでチート開発します〜
panda_program
0
1k
AIエージェントで業務改善してみた
taku271
0
540
The Less-Told Story of Socket Timeouts
coe401_
3
470
Featured
See All Featured
Helping Users Find Their Own Way: Creating Modern Search Experiences
danielanewman
31
3.2k
Are puppies a ranking factor?
jonoalderson
1
3.3k
Stop Working from a Prison Cell
hatefulcrawdad
274
21k
What’s in a name? Adding method to the madness
productmarketing
PRO
24
4k
Documentation Writing (for coders)
carmenintech
77
5.3k
Applied NLP in the Age of Generative AI
inesmontani
PRO
4
2.2k
A Guide to Academic Writing Using Generative AI - A Workshop
ks91
PRO
1
280
How to Get Subject Matter Experts Bought In and Actively Contributing to SEO & PR Initiatives.
livdayseo
0
100
Into the Great Unknown - MozCon
thekraken
41
2.4k
My Coaching Mixtape
mlcsv
0
100
The Director’s Chair: Orchestrating AI for Truly Effective Learning
tmiket
1
150
The Organizational Zoo: Understanding Human Behavior Agility Through Metaphoric Constructive Conversations (based on the works of Arthur Shelley, Ph.D)
kimpetersen
PRO
0
310
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
清單