Wouldn’t it be handy if using
and import
had methods (or @using
and @import
macros) that include and load the module at once?
using "MyModule.jl"
as an alias to
include("MyModule.jl")
using .MyModule
and
using "./MyModule.jl": myfunc
import "./MyModule.jl"
import "./MyModule.jl": myfunc
etc?
(maybe a macro @using "./MyModule.jl": myfunc
, etc).
Of course those should throw an error if MyModule
is not found in MyModule.jl
.
Probably a good answer to this is “that simply is not worth the effort”. Fair enough