Hacker News new | past | comments | ask | show | jobs | submit login

Great article, and pretty unusual for Rust to silently start doing the unexpected thing.

From the start, I wished that Rust had used different punctuation for method calls on a `T` and a `SmartPtr<T>`. For instance, `my_t.f()` but `my_boxed_t->f()` (or get rid of auto Deref and just require `(my_boxed_t).f()`). For subscripting it could be something like `my_vec->[index]` (or just require `(my_vec)[index]`. Just something there to remind you that you are in fact using a smart pointer. This would also let you distinguish between `box.leak()` and `box->leak()` and not require `Box::leak(box)`.




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

Search: