<p dir="auto">julia 0.3.3 on Mac OSX 10.9.4/amd64</p>
<p dir="auto">When I re-define a function, any other functions that call that function need to be recompiled to use the new definition.</p>
<p dir="auto">Here is a simple example:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="julia&gt; function f()  print(&quot;f called\n&quot;)  end
f (generic function with 1 method)

julia&gt; function g() print(&quot;g, pre-f\n&quot;); f(); print(&quot;g, post-f\n&quot;) end
g (generic function with 1 method)

julia&gt; g()
g, pre-f
f called
g, post-f

julia&gt; function f()  print(&quot;hi, I'm a new definition of f \n&quot;)  end
f (generic function with 1 method)

julia&gt; g()
g, pre-f
f called            &lt;&lt;&lt;&lt;&lt;&lt;&lt; ARG, WHAT?!
g, post-f

julia&gt; "><pre class="notranslate"><code class="notranslate">julia&gt; function f()  print("f called\n")  end
f (generic function with 1 method)

julia&gt; function g() print("g, pre-f\n"); f(); print("g, post-f\n") end
g (generic function with 1 method)

julia&gt; g()
g, pre-f
f called
g, post-f

julia&gt; function f()  print("hi, I'm a new definition of f \n")  end
f (generic function with 1 method)

julia&gt; g()
g, pre-f
f called            &lt;&lt;&lt;&lt;&lt;&lt;&lt; ARG, WHAT?!
g, post-f

julia&gt; 
</code></pre></div>
<p dir="auto">if I define a function d2 before a function d1 which calls d2 then change d2, d1 uses the old definition for d2.<br>
I assume this is because it is all precompiled, but maybe there should be a note warning of this? Or would it be possible to replace the old definition with a longjmp to the new one?<br>
(Mostly important for the REPL, since I don't always do a full load)</p>
<div class="highlight highlight-source-julia notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="julia&gt; function d2()
       a
       end

julia&gt; function d()
         d2()
       end

julia&gt; d()
in d: a not defined

julia&gt; function d2()
       b=2
       end

julia&gt; d()
in d: a not defined

julia&gt; d2
Methods for generic function d2
d2() at prompt:2

julia&gt; function d()
         d2()
       end

julia&gt; d()
2"><pre class="notranslate">julia<span class="pl-k">&gt;</span> <span class="pl-k">function</span> <span class="pl-en">d2</span>()
       a
       <span class="pl-k">end</span>

julia<span class="pl-k">&gt;</span> <span class="pl-k">function</span> <span class="pl-en">d</span>()
         <span class="pl-c1">d2</span>()
       <span class="pl-k">end</span>

julia<span class="pl-k">&gt;</span> <span class="pl-c1">d</span>()
in d<span class="pl-k">:</span> a not defined

julia<span class="pl-k">&gt;</span> <span class="pl-k">function</span> <span class="pl-en">d2</span>()
       b<span class="pl-k">=</span><span class="pl-c1">2</span>
       <span class="pl-k">end</span>

julia<span class="pl-k">&gt;</span> <span class="pl-c1">d</span>()
in d<span class="pl-k">:</span> a not defined

julia<span class="pl-k">&gt;</span> d2
Methods <span class="pl-k">for</span> generic <span class="pl-k">function</span> d2
<span class="pl-c1">d2</span>() at prompt<span class="pl-k">:</span><span class="pl-c1">2</span>

julia<span class="pl-k">&gt;</span> <span class="pl-k">function</span> <span class="pl-en">d</span>()
         <span class="pl-c1">d2</span>()
       <span class="pl-k">end</span>

julia<span class="pl-k">&gt;</span> <span class="pl-c1">d</span>()
<span class="pl-c1">2</span></pre></div>