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

Reply via email to