Avatar
omochimetaru 7/12/2022 5:20 AM
It's been a while since the last iteration on the Opt-In Reflection metadata proposal, but we've been working with @Joe_Groff, @ctp and @mren on the updated version recently and while finishing the last bits, we would like to get the community's feedback on the new pieces in the proposal. TL;DR Reflectable is a marker protocol now and develope...
5:21 AM
バイナリに埋め込まれるメタデータを減らしてサイズを小さくできるように、
5:21 AM
今は常に全部埋め込まれているリフレクションメタデータを、
5:21 AM
Reflectable プロトコルに準拠する型だけ埋め込むというコンパイルモードを追加する話
5:22 AM
SwiftUIはそのリフレクションメタデータを使うので、 SwiftUI.View プロトコルには親プロトコルとして Reflectable を追加するらしい。
5:22 AM
また、 printdump 関数はそのリフレクションメタデータがなくても簡易な出力は可能らしい。
5:24 AM
「リフレクションメタデータ」はどうやらタイプメタデータの一部らしいので、オプトインモードにおいて消えるものと残るものがあるっぽいけど、そのあたりの詳細をよく知らないのでよくわからないけど。