Why is Base.summarysize not loaded like Base.summary?

When I start up julia REPL, Base.summary is loaded and I can use it directly like summary, but Base.summarysize must be used like Base.summarysize, else:

julia> summarysize
ERROR: UndefVarError: summarysize not defined

summarysize isn’t exported by Base, but summary is.

julia> :summary ∈ names(Base)
true

julia> :summarysize ∈ names(Base)
false

julia> :summarysize ∈ names(Base, all=true)
true

P.S. I recognize that I didn’t really answer the question of why summary is exported and summarysize isn’t. I assume that it is a compromise between convenient access for more commonly used functions and a desire to minimize naming collisions.

2 Likes