Avatar
前回少し紹介したType Wrappers使ったObservableのデフォルト実装なんですけど、Macro使って完全置き換えられたみたいです https://github.com/DougGregor/swift-macro-examples/pull/6 そもそもAttached Macros使えばType Wrappers自体いらないそうですw After taking the motivating use cases surfaced in this pitch thread and implementing them as macros, I'm confident that macros can fully subsume type wrappers while providing more flexibility to library authors. https://forums.swift.org/t/pitch-type-wrappers/60019/45 (edited)
Implements the Observable use-case for type wrappers as a combination of member, member attribute, and accessor macros. More information on the observation use case on the Swift Forums here: https:...
I've been working on the implementation for attached macros, and I had the chance to implement @Observable from the Future Directions section of the observation pitch. I was able to replicate the functionality in this type wrapper pitch through composition of the various attached macro capabilities. The macro approach provides more flexibility,...