3 ms·
Could you use this to make a Go REPL?
by Sir_Cmpwn 7y ago
Could you use this to make a Go REPL?
- minxomat 7y agoYaegi is a full go interpreter with a repl: https://blog.containo.us/announcing-yaegi-263a1e2d070a https://blog.containo.us/announcing-yaegi-263a1e2d070a
- eatonphil 7y agoLike the sibling mentions, yaegi seems to do that today (though I haven't used it). The method I wrote about doesn't seem particularly any more conducive to making a REPL than progressively building a valid Go program with each line and compiling/running that (since Go's compiler is very fast). However, there may be some benefits to prototyping in an environment like this where you can ignore types for a bit.
- teichmann 7y agoGomacro provides an interactive REPL https://github.com/cosmos72/gomacro https://github.com/cosmos72/gomacro.