If you define your types inside of a module, you can reload the module and get new types. This is a pretty convenient way to do this. Beware that you probably want to access things explicitly with Module.binding since bindings to old versions of the things tend to stick around.
On Mon, Feb 2, 2015 at 11:14 AM, Jiahao Chen <[email protected]> wrote: > Types are constants and cannot be redefined. > > Currently there is a workaround to use workspace(): > > julia> type foo end > > julia> type foo > A > end > ERROR: invalid redefinition of constant foo > > julia> workspace() > > julia> type foo > A > end > > However, workspace() does not work well in IJulia. > > Thanks, > > Jiahao Chen > Staff Research Scientist > MIT Computer Science and Artificial Intelligence Laboratory > > On Mon, Feb 2, 2015 at 11:10 AM, alex codoreanu <[email protected]> > wrote: > >> Hi, >> >> I am trying to figure out how to erase a previous instance of a type >> definition. I am writing a function that can dynamically alocate For >> example: >> >> instance 1 >> type data_return_type >> spec_name::String >> lambda::Vector(Float32} >> spec::Vector(Float32} >> end >> > >
