The zero-copy IO in Go is so elegant. I think you can really judge a language accurately by checking out its standard library. This is one of my favorite things about Go. By comparison, * The C++ STL. Fast and useful, but the implementation is nearly unreadable due to template soup. Here's one of the simpler parts! https://www.sgi.com/tech/stl/stl_vector.h * PHP. So bad it's basically a strawman. I'll include it beca…
if rt, ok := dst.(ReaderFrom); ok {
return rt.ReadFrom(src)
}
Isn't the most terrible way anyone has seen pattern matching implemented.At least it is better than Java's instanceof + cast.