If you use Juno you can eval into modules directly, without having to reload them, which makes stuff like this a lot nicer. AFAIK there's no other way to work around this, but I'd love to be corrected on that.
On 18 February 2015 at 08:53, Tamas Papp <tkp...@gmail.com> wrote: > Hi, > > I thought that using modules would solve my problems with iterative > development, but apparently not: when reloading a module that was used > in Main, conflicts mask the new definitions. > > Eg > > --8<---------------cut here---------------start------------->8--- > module Foo > export Bar, baz > type Bar > x > end > baz(b::Bar) = b.x > end > > using Foo > > baz(Bar(1)) # 1 > > module Foo > export Bar, baz > type Bar > x > end > baz(b::Bar) = b.x+1 > end > > using Foo > > baz(Bar(1)) # 1 > Foo.baz(Foo.Bar(1)) # 2 > --8<---------------cut here---------------end--------------->8--- > > What's the recommended way to work around this? Is there an approach > that would allow me to experiment with code in Main, while working on a > module that I keep reloading? > > Best, > > Tamas >