On Fri, Jan 13, 2017 at 6:47 AM, hui zhang <fastfad...@gmail.com> wrote:
> Yes ,   cycle import is a bad design.
> But as the software becomes larger , not everything is controllable.
> In real project , some times it is a great risk to do refactor.

Go is careful to initialize values in the correct order, such that if
the initializer for V1 refers to V2, then V2 is always initialized
before V1.  It is possible to break this by calling between packages
in the initializers, but it takes a fair amount of work.  If Go
permitted cyclic imports, correct initialization would be impossible.
Go has given up one feature (cyclic imports) in favor of another one
(simple and correct initialization).

Ian

-- 
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