You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently when you use a trait foo as a type it really means @foo. Like closures and vectors we should have more control over memory. Being able to cast to an &foo without copying would immediately make this style of polymorphism more useful.
Under this scheme you would probably be required to write a trait type as either @foo, ~foo, or &foo, and foo would be disallowed.
Simalarly, it would be useful if you could cast from a boxed type to a boxed trait without copying. That's probably a different issue though.
The text was updated successfully, but these errors were encountered:
Currently when you use a trait
foo
as a type it really means@foo
. Like closures and vectors we should have more control over memory. Being able to cast to an&foo
without copying would immediately make this style of polymorphism more useful.Under this scheme you would probably be required to write a trait type as either
@foo
,~foo
, or&foo
, andfoo
would be disallowed.Simalarly, it would be useful if you could cast from a boxed type to a boxed trait without copying. That's probably a different issue though.
The text was updated successfully, but these errors were encountered: