Some related (though slightly different) questions/answers: http://julia.readthedocs.org/en/latest/manual/faq/#how-do-i-delete-an-object-in-memory https://groups.google.com/forum/#!searchin/julia-dev/%22undefine%22$20variable/julia-dev/OTISvMKcr14/-0IN36I85tEJ
For more, you may try searching julia-dev (or possibly julia-users). Beyond these, there is (currently) no real way to unintern a variable. When questions like this have been brought up in the past, I vaguely remember the response being that implementing this would require deep changes in Julia, and that many other features had higher priority. Cheers, Kevin On Mon, Jan 26, 2015 at 11:41 AM, Tamas Papp <[email protected]> wrote: > OK, but I still don't know how to unintern a symbol. This is not > mentioned in the manual. > > On Mon, Jan 26 2015, Jameson Nash <[email protected]> wrote: > > > `quote ... end` (or `:(...)` for shorthand) can be used to create > > expression objects that are equivalent when eval'd to executing the > > expression directly. from there, you can explore the resulting Expr tree > > with dump() and Meta.show_sexpr() to observe the correct expression tree. > > > > you can convert symbols to values with eval() or getfield() > > > > > > On Mon Jan 26 2015 at 8:16:20 AM Tamas Papp <[email protected]> wrote: > > > >> Suppose I have a trivial module > >> > >> module Foo > >> x = 1 > >> end > >> > >> so names(Foo) now includes a Symbol that is === to symbol("x"). I have > >> two questions: > >> > >> 1. How can I intern symbols into a module programatically, possibly from > >> outside the module? symbol("Foo.y") does not work (using 3.5). > >> > >> 2. Similarly, how can I unintern symbols? Is this even possible in > >> Julia? This would be relevant for redefining types. > >> > >> Thanks, > >> > >> Tamas > >> > >> > >> >
