Quoting Space A. (2019-01-17 16:46:17)

> Go's package-level variables are also not "globals". And you can
> control access with exported/unexported names or exported/unexported
> package-level functions.

Exactly. A namespaced global is still a global, and most of the problems
with them still apply.

This is also why "singletons" are an antipattern -- they're just dressed
up globals.

-- 
You received this message because you are subscribed to the Google Groups 
"golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to golang-nuts+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to