1. Home
  2. Profile
GitHub
Stack Overflow
Email
Feed
I'm WeZZard
Making Software
Composing Music
Designing UX
© 2025 WeZZard All Copyright Reserved.

A Study of LLVM ADT: ilist, iplist and simple_ilist

Introduction ilist is an intrusive double-linked list -- which means that each linked node stores its data and the node pointers in the same structure. There is no such kind of linked-list implemented containers shipped with the C++ standard library. iplist is a purely intrusive list. Currently…

Jan 15, 2023
  • Programming
  • LLVM
  • ADT
  • C++

Using Functional Binding to Observe in SwiftUI

Story This week, my colleague asked me a question: how to observe user selection behaviors on SwiftUI's Picker ? This is a question came from real bussiness. Thus I think it worth to take me time to solve it. The example code is as shown below and my colleague wanted to observe user's behaviors on…

Aug 19, 2022
  • Programming
  • SwiftUI
  • Binding
  • Swift
  • Observer

Conforming to Codable for Associated Value Enums in Swift

Understanding Associated Value Enums Why there are associated value enums in Swift? I mean, why the Swift core team designed associated value enum? To understand it, firstly, let's take a look at the following example in C: The C struct Device represents a device. The member pointer is an…

Sep 10, 2019
  • Programming
  • Swift
  • Codable
  • Associated Value Enum

Unexplained SwiftUI - The Programming Language Nature of SwiftUI

Preface Apple introduced SwiftUI at WWDC 2019. Most people may seem SwiftUI as yet another UI framework likes Flutter , React.js or Vue.js which rides on the trend of declarative stateless UI programming. Even though there are some common points between them, SwiftUI is far different from…

Mar 6, 2022
  • Programming
  • Unexplained SwiftUI
  • SwiftUI
  • Swift

Swift Macro: Revisited - The Strengths and Essence

From the sessions at WWDC 2023, we learned that Swift Macro aims to: Eliminate boilerplates Make tedious things easy Share with other developers in packages However, these goals aren't unique to Swift Macro. They are common objectives for many code reuse methods in Swift, such as functions, types…

Aug 8, 2023
  • Programming
  • Swift
  • Macro

Adapting Reference Semantics Model in SwiftUI - The Basics

Introduction Recently, one of my colleagues had been struggling with porting reference semantics model to SwiftUI with ObservableObject and @StateObject . In this post, since there are many examples talked about porting reference semantics models to SwiftUI this way on the Internet, I'm not going…

Mar 2, 2023
  • Programming
  • SwiftUI
  • Swift
  • Adaptor
  • Reference Semantics
  • Binding

When the Swift Compiler Deleted Code in Stdlib - A Note of Fixing the Eliminate Redundant Load Pass in Swift 6

Latest updated: Apple has accepted the fix for this issue. The final solution was adjusted following a review by the relevant code owner. Right before the Chinese New Year vacation of the Year of the Snake, a colleague showed me a mysterious crash caused by a use-after-free error. Recently, I found…

Mar 9, 2025
  • Programming
  • Swift
  • Compiler

Swift Macro: Revisited - Traps and Pitfalls

In the previous post, we learned the strengths and the essence that uniquely define the Swift Macro. The examples in that post work so far so good. However, can we be confident and bold, implementing any Swift macros we want now? No. The features that bring Swift Macro advantages also introduce…

Aug 10, 2023
  • Programming
  • Swift
  • Macro
1 / 2
Later Posts

Freiheit ist Wille. Handeln ist Fähigkeit. Mut ist der Glaube, der mit der Zeit nicht nachlässt.
Built with Gatsby.js.