Great, thanks. Actually thought I had tried that... The warning confused me
to think it did not work... ;)

julia> module M
       f(x)  = x
       end
julia> M.f(x) = x+1
Warning: Method definition f(Any,) in module M at none:2 overwritten in
module Main at none:1.
f (generic function with 1 method)
julia> M.f(1)
2


On Thu, Jan 16, 2014 at 8:29 PM, Toivo Henningsson <[email protected]>wrote:

> You can do e.g.
>
> M.f(x) = 2x
>
> after you have loaded M to add/replace methods. But if M.f has already
> been invoked, it might have become compiled into some places.
>



-- 
Best regards,

/Robert Feldt
--
Tech. Dr. (PhD), Professor of Software Engineering
Blekinge Institute of Technology, Software Engineering Research Lab, and
Chalmers, Software Engineering Dept
Explanea.com - Igniting your Software innovation
robert.feldt (a) bth.se    or    robert.feldt (a) chalmers.se    or
 robert.feldt (a) gmail.com
Mobile phone: +46 (0) 733 580 580
http://www.robertfeldt.net <http://www.cse.chalmers.se/~feldt>

Reply via email to