Idea: trait mask

I'm glad you've actually stated and explained your objection, though I still don't fully understand it. I would need to understand what you mean by coherence and what constitutes global coherence, as well as what makes something a local interface.

My mental model is that traits are instructions and trait bounds are instruction requirements. Sometimes instructions can be used to do other instructions. Rust allows this with impl Trait for dyn Trait. I thought it could be helpful if this can be done while keeping static dispatch. I discovered that it can be done with static dispatch using wrapper structs and thought it would be useful if it could be made more accessible.

1 Like