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

That's not Rust's fault but library creators / programmers fault who often paint themselves into corner by refusing to use a heap allocation or clone here and there. Once you are ok with occasional boxing, you can easily do a lot of stuff that's otherwise hard - e.g. async traits or storing/passing/moving futures like any other value.

It is quite unfair to complain on convenience of Rust async used with no heap allocations to other languages which don't offer an option to avoid boxing at all. In e.g. Java when you return a Future it is always on the heap. In Golang, you don't even have a Future concept. So you basically can't do the same thing in other languages at all.



One thing which I am afraid of, is that people who make Rust applications or libraries aren't really responsible with its advanced features (which are great!).

Like I am positive we'll be getting GAT misuse / abuse just by sheer accident because people don't understand them (they're a complex language feature), just like we have libraries going async needlessly.


Funnily enough, this is discussed in length in the GAT stabilization thread.




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

Search: