# Exporting already existing names

**URL:** <https://discourse.julialang.org/t/exporting-already-existing-names/4999>\
**Category:** General Usage\
**Tags:** question, package\
**Created:** [July 21, 2017, 3:11pm UTC](https://discourse.julialang.org/t/exporting-already-existing-names/4999 "2017-07-21T15:11:46Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![juliohm](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/juliohm/32/215266_2.png) [@juliohm](https://discourse.julialang.org/u/juliohm)\
**Post date:** [July 21, 2017, 3:11pm UTC](https://discourse.julialang.org/t/exporting-already-existing-names/4999/1 "2017-07-21T15:11:46Z")

</div>

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:

```julia
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?

---

<div class="post-metadata">

**Author:** ![kristoffer.carlsson](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/kristoffer.carlsson/32/22_2.png) [@kristoffer.carlsson](https://discourse.julialang.org/u/kristoffer.carlsson)\
**Post date:** [July 21, 2017, 3:39pm UTC](https://discourse.julialang.org/t/exporting-already-existing-names/4999/2 "2017-07-21T15:39:32Z")

</div>

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