News for hackers. Stuff that matters.
Re:Why Go is elegant and makes my code elegant by jbooth on Wednesday April 09, 2014 @06:11PM (#7562834)
There's a robust syscall package that you can use to do whatever you want.

And, under the hood, all of their net.Conn types use non-blocking i/o combined with the goroutine scheduler.

Basically, the philosophy is that rather than do it yourself, just write really simple blocking code using lots of really cheap goroutines, and the runtime non-blockifies it for you. If you really want nonblocking behavior, you can easily spin off a goroutine to do your i/o and then send on a channel or callback or whatever, and if you really want really nonblocking behavior, you can less easily use the syscall package to write your own conn type.

There are no comments on this comment yet.