I’ve never understood the “async I/O is too complicated, why can’t we just use goroutines?” criticism of Rust. You can! They’re called threads, and they work great.
-
-
is it realistic to have OS threads with stack sizes as small as goroutines, which i think start at somewhere like 2-4KB?
-
Yes, if you had a GC. The kernel stack size is 8kB, which is pretty small. Add 2kB for the userland size and you’re at 10kB. I don’t think the difference between 2kB and 10kB per thread matters for most apps, which often have to grow that size anyway.
- 3 more replies
New conversation -
-
-
It is possible use small stacks in non-GC languages too, but needs more attention to frame sizes and call depth. 2kb would be a fun challenge; 16-64kb ought to be more friendly
Thanks. Twitter will use this to make your timeline better. UndoUndo
-
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.