2 ms·
> so Rust cannot just take the same approach as Go I did not suggest that it do so. In fact, I suggested an approach that wouldn't fit for Go! In Go, you've g
by brandonbloom 7y ago
> so Rust cannot just take the same approach as Go
I did not suggest that it do so. In fact, I suggested an approach that wouldn't fit for Go!
In Go, you've got pretty strict modular compilation. Because of this, specialization -- which is pervasive in Rust -- is virtually absent in Go. Rust's rich generics system demands robust specialization machinery. This machinery, which handles instantiation of explicit generics, can be repurposed to handle automatic instantiation of implicit generics. In this case, I'm suggesting that a function could be compiled as either synchronous or asynchronous as determined by the use-site.
> In Rust, every bit of async implementation (futures, schedulers, etc) is a library
Nothing about my suggestion precludes this.