|
|
|
|
|
by sbinet
3938 days ago
|
|
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. nothing's wrong with that except that you accumulate side-effects: gorepl> f := func() { launchMissiles(); fmt.Printf(">>> missiles launched\n") }
gorepl> f()
>>> missiles launched
gorepl> var a = 2
>>> missiles launched
gorepl> fmt.Printf("oops!\n")
>>> missiles launched
oops!
that's not the kind of REPL I want, and that's not what "my" REPL does (https://github.com/sbinet/igo) nor the one built on top of LLVM (llgoi: http://llvm.org/viewvc/llvm-project/llgo/trunk/cmd/llgoi/) |
|