孙翔宇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
孙翔宇What you need to know before putting a finger on the Swift ConcurrencyWhen you create a `Task` in Swift without specifying a particular actor context or using `Task.detached` , the task is not bound to any…Jul 26Jul 26
孙翔宇Beyond the MainActorDont you feel it is a bit weird about what is going on here if you are already calling `performBackgroundTask` on the main thread?Jul 26Jul 26