孙翔宇Size and Stride — Basics of Memory Layout in swiftIn Swift (or any programming language), the size and stride of an array are related to how data is stored and accessed in memory.5d ago5d ago
孙翔宇How to unit test an AsyncStreamFinally, I started to touch the overheated topic. It started our project migration from ReactiveKit to Swift concurrency.Nov 8Nov 8
孙翔宇Is Programming a Job of Creativity?In the world of programming, where code and logic take the forefront, it’s easy to overlook a fundamental aspect that many of us deeply…Oct 27Oct 27
孙翔宇Error existential can be toll-free converted to NSErrorIn Swift, an Error can be converted into an NSError because of how Swift's error-handling system is built on top of Objective-C's…Oct 7Oct 7
孙翔宇Cautious about putting published property in an ObservableObjectIn SwiftUI, when an array is marked with the @Published property wrapper does not trigger a view update, it usually stems from how SwiftUI…Aug 30Aug 30
孙翔宇Swift UI animation: closure or modifier?To understand how the .animation modifier and withAnimation closure work under the hood in SwiftUI, we need to explore how SwiftUI handles…Aug 14Aug 14
孙翔宇Is swift Int time expressable?Such a useless interesting question but just discovered it now.Aug 14Aug 14
孙翔宇Swift Enum can be used to create Generic code, but should you?When we talk about generics, <> comes into our minds. And we normally think about protocols as generic constraints.Aug 2Aug 2
孙翔宇Using swift enum as an abstraction techniqueMost of the time from WWDC you will get this definition. existential types are value abstraction and generic is type abstraction. They are…Aug 2Aug 2
孙翔宇Trampoline functions in SwiftIn Swift, trampoline or wrapper functions are used to manage function execution, often to work around issues related to stack overflows in…Jul 31Jul 31