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

> * It restricted the type of range/container passed to it

Yes, it did, but as I mentioned before, it's overengineering to make everything generic that could possibly be generic.

> * It had unnatural ownership semantics (borrowing a box of unique things without saying you're borrowing those things is weird).

No, it's not, it's quite natural. `&[&Drawable]` is not a subtype of `&[~Drawable]`, so if your caller has an array of `&[~Drawable]`, then they would have to recreate the array to pass it to that function.

> * The implementation, as was, required further borrows which were only implied. In C++ you take everything straight away.

I don't understand what this means, but in any case C++ and Rust don't differ substantially on ownership/reference/move semantics.



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

Search: