That’s nice, but that does mean the final ordering in which the code is actually loaded is implicit. So I agree “moreover anything implicit is just an easy source of bugs, really”, which is the worrisome issue for having it all worked out implicitly by a resolver on a DAG. include
forces you to choose an order. That orders makes all things well-defined: that order makes you able to know what any values of overridden globals would be.
The other method can mean if you do Main.a = i
in modules A_i
, the internals of the DAG can choose to order forward, reverse, or not sort at all, and those can all change the value of a == 2
in the user’s REPL. It can change when you change the version of Julia, because that could potentially change the heuristics of the resolver. It can change when you change the file name. That by definition is spooky action at a distance.
That’s not to say it’s any worse, there’s definitely some benefits to having all of that implicit. But it’s implicit.