Skip to content
1: Swift API 設計之 Value Type 與 Reference Type episode artwork

Jul 28, 2019 43 min

1: Swift API 設計之 Value Type 與 Reference Type

from weak self Hosted by 13

波肥想跟我們談談使用 Swift 時,介面設計的想法、觀念與小技巧。因為太長講不完,所以這集先討論 Value Type 與 Reference Type。 { 完整節目筆記 https://weakself.dev/episodes/1 } Swift 這門語言的明確性原則 Modern Swift API Design (WWDC 2019) Swift Modules 官方文件 只 import 一個 class 或 func - NSHipster 大量使用 Value Type 的 Swift 值還是引用? Local Reasoning Stack vs Heap Understanding Swift Performance (WWDC 2016): Heap, Stack and Performance Swift 裡用來管理 heap memory 的資料結構是 doubly linked list 扯題:ABI 穩定 什麼場合要用 class 當你需要 retain count 以及 deinitialization 時 當你需要 shared 資料 (centrally held and shared, singleton) 扯題:struct 可以有 singleton 嗎? 當 identity 不等同於 equality Tagged Pointer 詳解(只適用於 iOS 12 之前的版本。iOS 12 有新的 Tagged Pointer 機制) 假使拿 struct 包 class 扯題:SwiftUI 用的 @propertyWrapper 更多 weak self 主講人 一三、波肥、喬喬 官網 https://weakself.dev Twitter @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

1: Swift API 設計之 Value Type 與 Reference Type

0:00 43:13

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 43 minutes long.

When was this weak self episode published?

This episode was published on July 28, 2019.

Can I download this weak self episode?

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