3 ms·
Couldn't roughly the same thing be done with relative ease in any language that builds it's IO actions in terms of Input/Output streams? It's a nice write-up,
by supersillyus 15y ago
Couldn't roughly the same thing be done with relative ease in any language that builds it's IO actions in terms of Input/Output streams?
It's a nice write-up, but I'm not sure it shows off anything particular to Go.
- enneff 15y agoThe same thing could certainly be done in other languages. I'm not convinced as to the "relative ease". I find the use of a slice backed by a temporary array particularly cool. In any case, this post was written to educate Go programmers, and not (primarily) to evangelize Go.
- supersillyus 15y agoAh, makes sense. I assumed it was intended to be evangelical. Also, the slice backed by inline array is a pretty great thing. It's cache-friendly, avoids extra allocations, and is pretty easy to use safely. Aside from D, I don't know of any other usable garbage-collected languages that can do this so nicely.