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

As discussed elsewhere in this thread, the most direct translation of that code would also be a linked list of futures, but I don't see an alternative for that sort of structure in general (i.e. every scheme for this sort of asynchrony will have a dynamic chain of allocations).

However, the library does provide various abstractions that can abbreviate certain patterns and do them more efficiently than otherwise, e.g. http://alexcrichton.com/futures-rs/futures/fn.collect.html for this case.



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

Search: