OpenCombine
OpenCombine copied to clipboard
Bug: Combine's `ObservableObject` doesn't use `Mirror`
The "real" Combine doesn't use Mirror to implement ObservableObject as discussed in this thread: https://forums.swift.org/t/how-is-the-published-property-wrapper-implemented/58223/11
Instead, it uses the private _forEachField(of:options:body) reflection method from the standard library.
This isn't a mere difference in implementation details either, it has an observable (heh, pun intended) difference: OpenCombine's behaviour can be hooked by conforming to CustomReflectable, whereas "real" Combine ignores it. PoC: https://github.com/OpenCombine/OpenCombine/pull/255