When using modules, is “import” or “using” needed? The reason I ask is that in the following toy example, according to my reading of the documentation, an “import” (or “using”) statement is required. But the program runs whether or not the “import” statement is commented. Why?
And assuming it is not needed, is it bad practice for me to make a habit of not using it?
@printf("%g^2 = %g\n", x, x^2)
end # module ex1mod
#import ex1mod # not needed!
Thank you. But (at least) 99.9% of all software I have ever written (not just in Julia) has been for personal or internal company/department use. So it seems to me that, for the average user, the advice should be to not worry about using “import” and “using” for loading your own modules, or using “export” inside your modules, unless intending to make it into a package.