Modules are always namespaces, a space to isolate names is the fundamental characteristic of a Julia module.
It does, just not as a distinct keyword. A package is a matter of how a module is loaded, managed, and distributed. Julia also specifies package extensions, precompilable modules loaded in a different way from packages; extensions can’t even be using/import-ed. The Manual could probably explain these concepts in a better way, but it does.
All the design limitations mentioned here so far is about precompilation, so if a module would never be precompiled, then there’s no reason to write it with those limitations.
I was speaking of interactivity and scripts as the typical situations where you wouldn’t precompile a module, but terminology and examples might be clearer. Interactivity is about manual interaction with the Julia REPL. A script is a (usually shorter) file containing Julia code to be evaluated on demand.
julia> include("ModX.jl") # evaluate a script
Main.ModX
julia> module ModX # directly type into REPL
x = 1
end
WARNING: replacing module ModX.
Main.ModX
julia> using .ModX: x as x2 # preceding dots, unlike package imports
julia> x2
1
We could also just run the entire Julia process only for the script, no interaction with the REPL:
PS C:\Users\Benny> julia ModX.jl
In all these cases, the module was just a namespace in code evaluated on our demand. It wasn’t precompiled (in more words, executed during a precompilation phase to be cached) as part of a package or a package extension. Note that submodules of a package or package extension would be precompiled along with them, so dots in imports don’t generally indicate lack of precompilation.
When you added your directory of .jl files to LOAD_PATH, you’re treating those files as packages inside environments for using/import (no dots). Again, there are other proper ways to develop a package, and this is not how anybody should routinely load a module. I’m surprised you ever ran into this approach, I don’t know of a source that suggests it. The Manual does mention package directories (also no longer recommended), but that has src folders.