Fields in Traits

You already have the Index and Deref traits which allow impls that may panic and do arbitrary "hidden" computations to what only looks like memory access (at least in the eyes of a C programmer).


I'd like to take a step back and ponder the nature of traits. I don't feel totally comfortable with the idea that a trait can specify the contents of a type -- it feels too close to inheritance.

8 Likes