state.
as I said elsewhere in this HN thread, many of the first REPLs that appeared when Go was first released used this rather effective scheme of recompiling on the fly a single main.go file after each new input the user entered and re-running the whole thing.<p>nothing&#x27;s wrong with that except that you accumulate side-effects:<p><pre><code>  gorepl&gt; f := func() { launchMissiles(); fmt.Printf(&quot;&gt;&gt;&gt; missiles launched\n&quot;) }
  gorepl&gt; f()
  &gt;&gt;&gt; missiles launched
  gorepl&gt; var a = 2
  &gt;&gt;&gt; missiles launched
  gorepl&gt; fmt.Printf(&quot;oops!\n&quot;)
  &gt;&gt;&gt; missiles launched
  oops!
</code></pre>
that&#x27;s not the kind of REPL <i>I</i> want, and that&#x27;s not what &quot;my&quot; REPL does (<a href="https:&#x2F;&#x2F;github.com&#x2F;sbinet&#x2F;igo" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;sbinet&#x2F;igo</a>) nor the one built on top of LLVM (llgoi: <a href="http:&#x2F;&#x2F;llvm.org&#x2F;viewvc&#x2F;llvm-project&#x2F;llgo&#x2F;trunk&#x2F;cmd&#x2F;llgoi&#x2F;" rel="nofollow">http:&#x2F;&#x2F;llvm.org&#x2F;viewvc&#x2F;llvm-project&#x2F;llgo&#x2F;trunk&#x2F;cmd&#x2F;llgoi&#x2F;</a>)