TE
科技回声
首页24小时热榜最新最佳问答展示工作
GitHubTwitter
首页

科技回声

基于 Next.js 构建的科技新闻平台,提供全球科技新闻和讨论内容。

GitHubTwitter

首页

首页最新最佳问答展示工作

资源链接

HackerNews API原版 HackerNewsNext.js

© 2025 科技回声. 版权所有。

Ask HN: Why is Go lang so popular for cloud infrastructure

33 点作者 gazarullz超过 8 年前
Why there are so many tools built on top of Go now-days and not in other languages like Java, Rust, C# or C&#x2F;C++ ?<p>What motivates people to pick Go instead of the others which are more stable and seasoned or more performant ?

13 条评论

tracker1超过 8 年前
Go is a decent language, with some really good built in protections (great concurrency model), a massive standard library, and a single binary output that&#x27;s immensely portable (compared to pretty much anything other than C&#x2F;C++&#x2F;D, etc).<p>Those are some of the main reasons... it&#x27;s great for pushing data with relatively low overhead, and relatively high safety.<p>Compared to Rust, you could do very similar, but the language is a much larger break from what most are used to.<p>Compared to Java&#x2F;C#, you don&#x27;t have a relatively large runtime to install, not nearly as portable. I really like C# myself, but it&#x27;s not for all use cases, and the framework need make it a poorer choice for infrastructure tooling. Also the concurrency model is more transparent in go... in C#, for example, you can use pooling techniques, but they take more thought and planning. Java has a history of huge overhead and tooling as well.<p>Compared to scripted languages, not worth even considering.<p>It really depends on your needs, but the fact is that Go and Rust are fairly new, but build with specific needs in mind and do most of them better than other options, with better safety and more transparent ease of use. Go tends to be better for networking&#x2F;communications, and Rust tends to be better with interacting on system internals.<p>This is from a conscientious observer. I haven&#x27;t had a good use case for either, but may have one for go coming up, so looking forward to that.
评论 #13078370 未加载
tmaly超过 8 年前
I think the 1.0 compatibility promise, the simplicity of the language, and great standard library let people focus more on the problem than other languages.<p>I wrote my own zero allocation xml parser in Go the other day and it is 2-3 times faster than the standard library. It was not difficult to do mainly because I could reference what the standard library was doing. The code is easy to read and understand.
NetStrikeForce超过 8 年前
As someone that&#x27;s not a developer I like Go because I&#x27;m able to start fast and get binaries for any major platform without having to install external dependencies.<p>I code and test on a Windows box and I deploy to Linux without any changes.<p>You could say the same about Python, but not really. With Python I have to maintain the Python environment anywhere I want to run my software. With Go I only have to maintain it where I compile the code, so the final machine where it&#x27;s deployed could even not have Go installed and still run my Go silly tools.
twunde超过 8 年前
Golang is cross-platform unlike C#, doesn&#x27;t have a large start-up time like Java or C#, is more mature than Rust and higher level than C&#x2F;C++. A large part of its popularity was that it was picked up by the python and ruby community, many of whom highly dislike Java, C# and C.
aprdm超过 8 年前
IMO go is all about simplicity with a decent stdlib. Fast, single binary to distribute... Can&#x27;t go wrong really.
bsg75超过 8 年前
Rust is less seasoned.<p>C# is fine on Windows, Linux support is second priority.<p>C&#x2F;C++ takes a bit more work and skill (IMO).<p>Java is probably very widespread, but less popular from a publicity standpoint.<p>Go is equally stable on Win and Linux, decent standard library, easy to pick up for Python, Ruby, Java, C or C++ devs, has a simple deployment model, had a good concurrency model, and provides fast builds. It has its detractors due to features not in other languages, but fits the need for a wide variety of others.
评论 #13072187 未加载
jstewartmobile超过 8 年前
Why I chose Go for a network application, in no particular order:<p>- easy concurrency with CSP&#x2F;channels<p>- decent documentation<p>- cgo makes it almost trivial to link to C dependencies<p>- strong UTF-8 support, native distinction between bytes and &quot;Runes&quot;<p>- multiple return values make it easy to deal with return values and error codes in the same function instead of having to resort to a by-reference parameter to capture one or the other<p>- has a lot of the simplicity of C, with a lot less of the ambiguity<p>- gets a lot of love from Google, substantial improvements in almost every release
Dinius超过 8 年前
Performance, easy concurrency, and because the language itself is very &quot;straightforward&quot;.
lox超过 8 年前
It&#x27;s incredible standard library is probably the thing that motivates me the most. Beyond that, fast builds, good package availability, easy to compile for multiple platforms and great community support.
nitwit005超过 8 年前
There is probably more C# and Java tools than Go. There has been more time for libraries to build up.<p>But to the general thrust of your question, because that&#x27;s the problem Google was trying to solve? The built in libraries make it quite easy to write applications that speak HTTP&#x2F;HTTPS in a reasonably scalable way.<p>Rust will probably be comparable in the future, but isn&#x27;t quite there yet. C&#x2F;C++ remains a bit difficult, although it should become a lot easier if the C++ networking TS makes it in.
herbst超过 8 年前
C# lol. Anyway its fast and the library is made for the web it just fits perfectly and even has many libs to extend existing applications in other languages easily. Like making stuff in Go for rails apps just works
di4na超过 8 年前
Because it seems like Java without having to deal with JVM.<p>Like Java, it is not a good choice... but people stick to what they know.
评论 #13075298 未加载
itamarst超过 8 年前
Lots of technical choices are made based on cool-factor, not technical or business merit, especially in startups. Go is often a perfectly reasonable choice... but is often chosen for the wrong reasons.
评论 #13071047 未加载