Are swift_reflectionMirror runtime methods safe to use in forward compatible code?

That’s how Combine does it, though at the moment our ObservableObject implementation uses Mirror to find @Published properties. There’s no reason we couldn’t use _forEachField, though.

(Another fun fact about that function: it bypasses CustomReflectable conformances entirely, meaning it’s a bit more robust than Mirror for things like this.)

1 Like