Hacker News new | ask | show | jobs
by kaba0 1912 days ago
To be honest, I think of header files really lowly.

I do see now why would one use that, thank you! Though I still think that adding an explicit keyword to run init functions would be preferable, like `import init package`.

1 comments

That's what the underscore is. :-)

Other init code is stuff like "var foo = regexp.MustCompile(...)".

Then there may be transitive imports that do C code, and it really needs to run its init code.