It's discussed in the FAQ so there must be a good reason for it, though no rationale is mentioned.
http://docs.julialang.org/en/latest/manual/faq/#can-i-use-using-or-import-inside-a-function On Monday, March 2, 2015 at 3:00:21 PM UTC-5, Patrick O'Leary wrote: > > On Saturday, February 28, 2015 at 11:06:38 AM UTC-6, MA Laforge wrote: >> >> C++ provides "using namespace X" to "make available" the contents of X to >> the current scope. This even works on un-named scopes within a function: >> > > (etc.) > > I know this is something that's come up before, and I think rejected--I > think because it causes conflicts with multiple dispatch? But I can't seem > to find the thread(s). > > I can't create a hard conflict in a quick mental search for an example, > but I can create some level of confusion: > > module Foo > bar::Int = 1 > end > > module Baz > bar::Float64 = 27.3 > with module Foo # not current Julia syntax > bar #which bar is this? > end > end >
