Does Go provide REPL?

前端 未结 12 631
[愿得一人]
[愿得一人] 2020-11-30 17:22

The interactive environment is VERY helpful for a programmer. However, it seems Go does not provide it. Is my understanding correct?

12条回答
  •  孤独总比滥情好
    2020-11-30 18:11

    You also have a recent (March 2013) project called gore from Sriram Srinivasan, which can be useful:

    gore is a command-line evaluator for golang code -- a REPL without a loop, if you will.
    It is a replacement for the go playground, while making it much easier to interactively try out bits of code: gore automatically supplies boiler-plate code such as import and package declarations and a main function wrapper.
    Also, since it runs on your own computer, no code is rejected on security grounds (unlike go playground's safe sandbox mode).

提交回复
热议问题