Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

I actually partially disagree with this. Sure, for the higher level OS independent packages (e.g. “archive/tar”) this is great.

For stuff in the “os” package it’s a different matter. All of that code is a bit messy. Not because the authors did a bad job, but simply because it’s hard to implement the same API on half a dozen operating systems.

Then there is the “runtime” package which relies on a lot of global state, and has to work well in cases where heap allocations are not permitted.

Sure you’ll learn how the language works, but you shouldn’t draw inspiration from those on how to write your own code.



I suspect that the part of the stdlib that deals with the OS and runtime will be fairly messy and un-idiomatic in any language. They are inherently hairy problems.




Consider applying for YC's Winter 2026 batch! Applications are open till Nov 10

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: