4

rust async is one of those things that is just so ugly

that you think you should wait and in 10 years maybe they'll actually make it not ugly

reminds me of myself training myself for callback hell only for promises to then come out and it's like why did I the pain then and adapted. 80% of CSS I learned is also deprecated now, and I didn't bother to commit to brain the new stuff cuz I'm thinking like "well they'll change it anyway" even though that's sort of irrational. not like I can predict what will get deprecated

Comments
  • 1
    Async in Rust is under different constraints. In JS you can throw everything onto the heap and it'll work itself out

    Rust can't assume that a heap even exists, so it ends up quite a bit more explicit
  • 1
    I admire Rust's insistence on grouping async stackframe allocations aggressively, but it's completely misguided.

    - fewer large allocations are not universally better than many small ones

    - the programmer is not well positioned to make this decision because the size of async stack frames is unspecified and highly variable due to other optimizations

    - this is a perfect job for an optimizer with dozens of algorithms and constantly evolving research

    - the optimal solution is almost certainly a custom allocation strategy specifically for async stack frames with a mergeable free list that conserves locality.
Add Comment