Difference between Base and Core

The Base and Core modules are essential to the Julia run time… but how are the different? e.g. I can see Complex being defined in Base but Int types are defined in Core

Further, it seems that everything is “exposed” in Base:

julia> Base.Int
Int64

julia> Core.Int
Int64

julia> Base.Int == Core.Int
true

julia> Int.name.module
Core

I didn’t know either until I watched this last year starting around the 9:00 mark. JuliaCon 2019 | What's Bad About Julia | Jeff Bezanson - YouTube

It’s because some parts have to be duplicated so the necessary compiler internals can work, or something to that effect.

2 Likes

Core is what’s defined in C as the very core of the language. There is very little there. It’s used to bootstrap the rest of the language by gradually defining more and more of Base in terms of what was defined before. Core is kind of an implementation detail that users should never need to interact with.

7 Likes