问HN:Go语言能否成为一流的网络语言?
我大约有10到15年没有接触Go了,但最近TypeScript团队的公告让我重新开始关注它,似乎我之前遇到的大部分问题现在都已经解决了。对我来说,这个公告的一个关键点是,现有的Go比你能写出的最优化的JavaScript快大约10倍。
这让我思考,Anders和TypeScript团队可能会对Go工具链和语言做出一些重要的贡献(当然是出于他们自己的利益,但这对大家都有好处),而Go将变得更快,并发展出更好的类型系统。在语义上,干净的JavaScript和原生Go之间的差距可能会越来越小。(我一周前才了解到,JavaScript有一个结构体提案。)
你们认为接下来的15年会如何发展?十年前我曾想过TypeScript是否会成为JavaScript的一部分,而现在随着类型注解提案的提出,这一想法开始逐渐成真。是否有可能JavaScript与Go之间的桥梁会缩小?JavaScript会演变成Go吗?WASM的易用性会发展到使第三方语言成为更“自然化”的公民,几乎没有任何东西会在例如Go模块和JavaScript模块之间造成区别,除了文件扩展名?
你们怎么看?
查看原文
I haven't touched Go in about 10 or 15 years, but with the recent announcement from the TypeScript team, I started to look into it more again, and it seems most of the issues I had with it have since been fixed. And one of the key takeaways from that announcement for me was that status quo Go is about 10x faster than the most optimizable JS you could write.<p>This got me thinking, Anders and the TS team are probably going to offer upstream some significant contributions to the Go toolchain and language (for their own sake of course, but it benefits everyone) and Go will get even faster and evolve a better type system. And the gap between clean JavaScript and vanilla Go is likely to get smaller and smaller, in terms of semantics. (I just learned a week ago that there's a struct proposal for JS.)<p>How do you see this going over the next 15 years? I wondered about 10 years ago if TypeScript would ever become part of JS, and that's starting to come true with the type-annotations proposal. Is it possible that the bridge between JS and Go will just shrink? That JS will evolve into Go? That WASM's ergonomics will evolve to make third party languages more "naturalized" citizens, with almost nothing getting between an e.g. Go module and a JS module or differentiating them except the file extension?<p>What do you all think?