SE-0379: Opt-In Reflection Metadata

I suppose I’m worried about how this dilutes the concept of a marker protocol. Today, a “marker protocol” is a protocol that’s used purely for compile-time checking, with no ABI presence, no dynamic casting, and no impact on behavior at runtime. I’m a little concerned that we have only just introduced this concept and we are already starting to create exceptions.

Having said that, there is no practical obstacle here. I’m uncomfortable with the design and I’d like to express that in case this discomfort is widespread, leads to the recognition of a more serious problem, or can be addressed in a way that improves the design as a whole. But this observation is basically just a “design smell”, and I don’t see it as justifying a rejection by itself.

3 Likes