How to avoid function name conflict without using the package identifier every time

Putting a line like this should help:

const groupby = DataFramesMeta.groupby

Here is a completely reproducible example which does not require 3rd-party packages:

julia> module Foo
       export groupby
       groupby() = "Foo.groupby"
       end
Main.Foo

julia> module Bar
       export groupby
       groupby() = "Bar.groupby"
       end
Main.Bar

julia> using .Foo

julia> using .Bar

julia> groupby()
WARNING: both Bar and Foo export "groupby"; uses of it in module Main must be qualified
ERROR: UndefVarError: groupby not defined
Stacktrace:
 [1] top-level scope
   @ REPL[5]:1
julia> const groupby = Bar.groupby
groupby (generic function with 1 method)

julia> groupby()
"Bar.groupby"
7 Likes