Given the pending stabilization of the new
dyn Trait syntax, I think it’s time that we shift our terminology. I think we should start calling
dyn Trait types dynamic trait types. Moreover, we should deprecate the term “object safe trait” and say “dyn-capable trait”. These changes have a few advantages:
- It is relatively obvious from the syntax and helps explain what
- The existing “trait object” term feels suboptimal to me; it may confuse people into expecting something more OOP-like than they are getting. And anyway the “object”, in some sense, is the box more than the
dyn Traititself (that is, the
Box<dyn Trait>type in its entirety is really the object).
- “dyn-capable” just seems a lot more obvious to me than “object safe” – it expresses the idea that traits which accept some restrictions can be used in additional ways. It doesn’t confuse with memory safety or other forms of safety.