module MyModule
include("file.jl")
endI always thought that non exported objects could not be imported.
Thanks Patrick.Does this mean that there is no way to make things private? I thought that only explicitly exported symbols where accessible.Anyway then, what is the common approach in Julia to mark things as private? Python use single and double leading underscores, but haven't seen too much _s in JUlia code.
Just try to "using" a module redefining "sin", you won't try twice.
I'm also waiting for the first julia big projects and users begging "would it be possible to provide developer documentation on module Foo.jl? It's so big and intricated that I can't figure out what is used and when."
Wouldn't that make sense to allow only imports of exported functions? What's the rational of the consenting adult approach? Wouldn't it be possible to do things a la Python with the double underscore: mymod.__foo is not directly accessable, o e has to access it via mymod.__mymod_foo. Exported object could be accessable as they are and non exported object could be accessable through mymod.NotExported for instance.
While I like the consenting adults philosophy, and agree that export choices provide a useful signal when 'using' a module, that signal disappears when using 'import'.
As folks begin developing larger projects, 'import' will become more important for managing namespaces. In those cases it would be useful to have the option of importing only exported stuff.