On Sun, 2015-05-24 at 03:44, Cedric St-Jean <[email protected]> wrote: > I'm not a big Julia user yet, but if it's anything like Common Lisp (and I > think it is), then your problem is not with overloading - it's with > symbols. A::f and B::f are two different symbols. To solve that, you want > to have a module C that exports f (without necessarily defining anything > there), and have > using C > at the top of both A and B. This will make sure that the *symbol* f > referenced in A and B are the same. It's kinda like abstract-base-class > inheritance.
This was discussed here https://groups.google.com/forum/#!searchin/julia-dev/symbol$20lisp|sort:date/julia-dev/oLAQJTBL4sc/fpPL1J-SA_YJ I think Julia differs from Lisp that symbols do not have a module associated with them. > Cedric > > On Saturday, May 23, 2015 at 5:35:37 PM UTC-4, Gabriel Goh wrote: >> >> Thanks for the help guys! The pointer to the discussion helped! >> >> It seems the most "Juilesque" way to do this is to drop the modules >> altogether. All the solutions suggested didn't feel very appealing. >> >> Gabe >>
