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

The easiest* solution would be to do what rust does. You need to use & on both sides and error out on mismatch. Eg.

fn foo(bar: &Bar) { ... }

bar(&Baz)

* This would be a breaking change, so a non-starter.



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

Search: