If I have a function that uses two types as argument do I have to declare 
both types before defining the function?

I think an example will make my question clearer.

Say I want the following structure of a package:

#Package.jl
module Package
export f, g
include("foo.jl")
include("bar.jl")
end

#foo.jl
type foo end

f(arg1::foo, arg2::bar)
    yadda yadda
end

#bar.jl
type bar end

g(arg1::foo, arg2::bar)
   yadda yadda
end



This will not work because when f is declared, bar is not defined.

Is there anyway I can solve this without moving both type declarations to a 
separate file and including that first?

Reply via email to