Hi, I'm using Julia 0.3.1 and I feel like I'm seeing behaviour that is 
different from what is indicated in the manual in the "Modules" section 
(specifically, in the table) here:

http://docs.julialang.org/en/release-0.3/manual/modules/

I was playing around to learn the difference between using, import, and 
importall, and I noticed that no matter what you do in the "Import Command" 
column of the table, MyModule.x, MyModule.y and MyModule.p 
are always brought into the scope. So shouldn't every row in the table 
mention this (seeing as it's included in 1st and 4th rows)?

Also, a few paragraphs earlier is the statement:

"The import keyword supports all the same syntax as using, but only 
operates on a single name at a time. It does not add modules to be searched 
the way using does. import also differs from using in that functions must 
be imported using import to be extended with new methods."

I found this statement confusing because you can always extend functions 
from MyModule using the syntax MyModule.x(a, b) = a + b, for example, even 
if MyModule was brought into the scope with a "using" statement.

Finally, I find it kind of confusing that when importing or using specific 
entities from MyModule (e.g., import MyModule: x, y or using MyModule: x, y), 
you can still access MyModule.x and MyModule.y in addition to just x or y. 
This ties into my first point of MyModule.x, MyModule.y and MyModule.p always 
being brought into scope. Just wondering if there is a difference between 
using one versus the other.

Thanks,
Marc

Reply via email to