@Roger-luo, I don’t think you’re the only one who thinks that way.
Here are three posts that hint at similar topics:
- How to organise files and modules?
- Boot.jl – An attempt at loading folders
- Difference b/w include("foo.jl") and eval(parse(readstring(open( "foo.jl" )))) - #7 by djsegal
Maybe some of the code from Boot.jl might be useful in your pursuits.