Exporting already existing names

This is a very simple question, but it is the first time that I am confronting name clashing. Suppose I have a module that defines a custom dataframe type:

module GeoStats

using DataFrames

struct GeoData{DF<:AbstractDataFrame}
  data::DF
  coordnames::Vector{Symbol}
end

names(geodata::GeoData) = names(geodata.data)

end # module

If I try to export the method names, it clashes with Base.names and gives me a warning at least. I wonder how DataFrames.names was exported and I how could do the same?

What are the rules of thumb for exporting names in Julia packages?

Extend the function instead by importing the Base version or define it with Base.names

1 Like