Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

The part that your example is missing is that one side uses the trait object (Common) whereas the other side uses the "normal" type (Foo or Bar) or another trait object view of the object. And the be able to cast between such "smart-boxed" types after you acquired one of them.

See the disucssion a little bit below for examples with Rc (it's the same problem but within a thread instead of between threads).



Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: