The problem with workspace() is that if I am loading a few modules, then re-initialization time is nontrivial.
Eventually I will have to extend ESS to eval into modules, so now I am working on that. thanks, Tamas On Wed, Feb 18 2015, Tim Holy <[email protected]> wrote: > As you noted, if you scope every call by the module name (Foo.baz() rather > than baz()), then you will be fine. Or use the workspace command. > > http://docs.julialang.org/en/latest/manual/workflow-tips/#a-basic-editor-repl-workflow > > --Tim > > On Wednesday, February 18, 2015 09:53:24 AM Tamas Papp 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
