Why Base doesn't reexport from submodules?


#1

I was looking at baremodule Base, and noticed that it has no exports.
Fox example there is the following line:

using .Iterators: zip, enumerate

For functions like zip, enumerate to be available after using Module, at the moment I’m forced to reexport them:

module Module

export f

include("submodule.jl")
using .SubModule: f

end

But Base seemingly does no such thing, and zip and enumerate are available to us without using Base.zip(...). What’s the catch, could someone please explain?


#2

Base have all the exports in the base/exports.jl file, and in particular here you find zip and enumerate.


#3

Wow, thanks @fredrikekre. I thought some magic is going on here.