Preferences

What do you mean by "can't"?

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


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.

This item has no comments currently.

Keyboard Shortcuts

Story Lists

j
Next story
k
Previous story
Shift+j
Last story
Shift+k
First story
o Enter
Go to story URL
c
Go to comments
u
Go to author

Navigation

Shift+t
Go to top stories
Shift+n
Go to new stories
Shift+b
Go to best stories
Shift+a
Go to Ask HN
Shift+s
Go to Show HN

Miscellaneous

?
Show this modal