Regarding the first two questions:
-
nope, you don’t need to
import
to define a method, you can also quality a name, egBase.length(foo::Foo) = length(foo.contents)
This is a design choice for Julia.
-
See this discussion about function types for pointers.