Hacker News new | ask | show | jobs
by mike_hock 26 days ago
Zero-Copy in Go: Why magic is an antipattern, and: performance is observable behavior.
1 comments

What would you prefer?

I do think it is criminal this is not documented (https://pkg.go.dev/io#Copy), but I think io.Copy is fine as an API.

it is documented by saying it calls ReadFrom or WriteTo
Sure, but it could be more explicit. See Rust for how it should be done.