Hacker News new | ask | show | jobs
by virgilp 3103 days ago
I'm not familiar enough with golang, but from your description it seems like in the Rust world, you're saying "I prefer the mio crate[1]"

[1] https://docs.rs/mio/0.6.10/mio/

1 comments

AFAICT, a more go-like approach would be to use std::fs inside a std::thread
What's missing here is that Go has a userspace scheduler and greenthreads. Despite presenting the user with something that looks like old school blocking IO, because you are only blocking a greenthread it is actually asynchronous IO under the hood.

And of course there is a huge amount of abstraction to build this up. It's just all hidden in the language runtime, so people can say with a straight face that there is "no abstraction and no cruft."