Hacker News new | ask | show | jobs
by Osiris 420 days ago
What do you mean by "can't"?

"Can not" means "not possible", but it's clearly possible.

1 comments

I obviously meant "can't" not RFC 2119 "MUST NOT".

I could list more sources, but I'll just leave you with these:

https://go.dev/blog/package-names

https://google.github.io/styleguide/go/best-practices#util-p...

https://dave.cheney.net/2019/01/08/avoid-package-names-like-...

The Google style guide is worth a read through, as the subsequent point recognizes the difficulties around package size. It can make sense to have a package with a single function, and it can almost make sense to stuff your entire program/library in a single package.

The two rules work that exacerbate this tension are precisely visibility and no cyclic dependencies.

The perfect is the enemy of the good. Forbidding cyclic dependencies is one such case, IMO.