Skip to content
70: Swift Runtime 之 Method Dispatch—Static, Table, or Message episode artwork

Mar 7, 2021 52 min

70: Swift Runtime 之 Method Dispatch—Static, Table, or Message

from weak self Hosted by 13

{ 完整節目筆記 https://weakself.dev/episodes/70 } 波肥來介紹 Swift 的 method dispatch。 👋開場 ⏪上集節目回顧 聽眾 dan12411 貢獻他的 Xcode 技巧。 📰一週開發者新聞 🧪Xcode 12.5 beta 3 & iOS 14.5 beta 3 ⏬XcodesApp 🥰工程師幹話—工程師應該要放心大膽的不寫文件 🧩Flutter 2 is here ⭐️Swift Runtime 1—Method Dispatch in Swift/ObjC: Static, Table, Message Dispatch struct 的 func 一定是 static dispatch。因為 optimization 設定的不同,有可能會是 inline class 的 func 通常是 table dispatch。如果加了 final 或是在 extension 定義新 func 就會是 static。 Swift 裡的NSObject subclass,一般 func 也是 table dispatch,即使加了 @objc 也一樣。若是 @objc dynamic就會是 message dispatch。如果加了 final 就會是 static 想要自行研究的話,可以用以下方法(程式碼請見完整節目筆記) 用 swiftc -emit-silgen Foo.swift -Onone 即可得到 SIL 💸勸敗話題 13 的開發者週報 歡迎大家來貼職缺或求職作品 小小夢魘2 👋收尾 更多 weak self 聽眾信箱 [email protected] 官網 https://weakself.dev 主持人 一三、波肥、喬喬 Twitter @weak_self 提問箱 贊助 weak self This is a public episode. If you would like to discuss this with other subscribers or get access to bonus episodes, visit weakself.substack.com

Episode details come from the podcast's RSS feed.

Embed this episode

Ready to play

70: Swift Runtime 之 Method Dispatch—Static, Table, or Message

0:00 52:26

No transcript yet.

Requests help us decide what to transcribe next.

Frequently asked questions

How long is this episode of weak self?

This episode is 52 minutes long.

When was this weak self episode published?

This episode was published on March 7, 2021.

Can I download this weak self episode?

Yes. Use the download control on the episode player to save the publisher-provided media file.