Monday, November 21, 2022 [Tweets] [Favorites]

Swift Pitch: Reflection

Alejandro Alonso:

I propose adding a new module to the Swift toolchain named Reflection that provides high level APIs for reflection in Swift. This makes use of reflective information that has always been available, but was never exposed as API until now.

[…]

[Mirror] works great, but there is a serious issue here in that it requires an instance of the type you want to introspect over.

[…]

Swift introduces a new module, Reflection, with a whole new suite of high level APIs that make working with reflection easier, more ergonomic, and provides developers with much more information than what they had.

Previously:

Comments

Stay up-to-date by subscribing to the Comments RSS Feed for this post.

Leave a Comment