douchanxiu5636 2017-06-01 11:14
浏览 37
已采纳

有Golang终端壳吗? 有可能使用编译语言吗?

Recently I'm interested in Golang.

When I was learning Python I kicked off a terminal shell and just practised throwing it different data, files, making many trivial silly operations, it's such a nice way to interact with a new language and it's super helpful for writing new programs.

I wonder- I guess because Golang is a compiled language like Java it's not possible to have such a terminal shell. Is that right? If so- what's the real technical reason why it can't work?

  • 写回答

1条回答 默认 最新

  • dongtaogu8510 2017-09-08 02:03
    关注

    Not enough reputation for a comment so I am putting this here.

    I Felt the same way when I first started using golang having used python for years. I have since decided that for anything beyond trivial coding (which can be done on the go playground) I end up writing a script for anyways and it's really not much harder to add in the boiler plate stuff.

    The key I believe is that Go compiles fast enough that I think most people haven't really noticed an issue with just recompiling and running the entire program to see their changes.

    You are right though, Go is compiled. This is fundamentally different than say Java or Python which both use Virtual Machines to generate code which it then executes. You can't run a Java program or Python program without the JVM or python interpreter respectively. A go program on the other hand once compiled can be distributed directly with no dependancies, one reason that many people love it for deployment.

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论

报告相同问题?

悬赏问题

  • ¥15 oracle集群安装出bug
  • ¥15 关于#python#的问题:自动化测试
  • ¥20 问题请教!vue项目关于Nginx配置nonce安全策略的问题
  • ¥15 教务系统账号被盗号如何追溯设备
  • ¥20 delta降尺度方法,未来数据怎么降尺度
  • ¥15 c# 使用NPOI快速将datatable数据导入excel中指定sheet,要求快速高效
  • ¥15 再不同版本的系统上,TCP传输速度不一致
  • ¥15 高德地图2.0 版本点聚合中Marker的位置无法实时更新,如何解决呢?
  • ¥15 DIFY API Endpoint 问题。
  • ¥20 sub地址DHCP问题