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

科技回声

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

GitHubTwitter

首页

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

资源链接

HackerNews API原版 HackerNewsNext.js

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

Why Go is doomed to succeed

291 点作者 dawkins将近 10 年前

35 条评论

vezzy-fnord将近 10 年前
Go is doomed to succeed because it extends the mental model of C with a concurrency model that finds a decent compromise between power and ease of use, makes the typing less prone to subversion, adds memory safety via GC, uses a structural subtyping system through interfaces that brings many OO-like benefits while still keeping to the C struct way of thinking, first-class functions, various syntactic rough edges cleaned up and so forth.<p>Because the Unix system programming world (and POSIX particularly) is very much built with the conventions and semantics of C in mind, most serious POSIX programming outside of C means you have to deal with painful FFIs, lousy wrappers, overly abstracted APIs that hide details like certain lower level flags and so forth. Some are better at this than others, of course (OCaml is one of the better ones)... but, nonetheless.<p>So it&#x27;s unsurprising that many infrastructure developers are jumping to Go. There&#x27;s just enough new things to incentivize a switch, but not <i>too</i> much that it dissuades from it.
评论 #9711689 未加载
评论 #9711492 未加载
评论 #9712620 未加载
评论 #9714116 未加载
评论 #9712681 未加载
Animats将近 10 年前
It&#x27;s very clear what Go is for. Go is for the kind of stuff Google runs on their servers. C++ is too complex, too unsafe, and too hard to maintain, and Python is too slow. (Remember that &quot;slow&quot; at that scale means &quot;we have to add another acre of servers.&quot;)<p>Go is an OK language for server-side stuff. It&#x27;s not perfect. The concurrency isn&#x27;t as airtight as its proponents originally claimed. Reflection and type &quot;interface{}&quot; tend to be needed too often. Other than that, there are few killer problems with the language when doing server-side stuff.<p>The libraries for doing web server type stuff are available and well debugged. When you use a Go library that came from Google, you&#x27;re probably using code that&#x27;s executing a few million times a second on Google servers. (As I mentioned on here a few months back, I recently ported a medium-sized production Python program from Python 2 to Python 3. I found library bugs which would have been found long ago were the code heavily used.)<p>So yes, Go is doomed to succeed. That&#x27;s not a bad thing.<p>As for Rust, while I like Rust personally, it may be too complex. The borrow checker concept is brilliant, and a huge advance in understanding how to avoid a big class of bugs. We&#x27;ll see that again in future languages. The type and generic system, though, pick up where C++ left off, and seem to lead library developers to develop very complex interfaces.<p>Rust is for people who debate language semantics on Lambda the Ultimate and program in Haskell for fun. Go is for people who have a job to do.
评论 #9713008 未加载
评论 #9713104 未加载
评论 #9712692 未加载
评论 #9712768 未加载
评论 #9712966 未加载
评论 #9712874 未加载
评论 #9714165 未加载
评论 #9715343 未加载
评论 #9712686 未加载
评论 #9712712 未加载
spopejoy将近 10 年前
Go succeeds because Google&#x27;s behind it.<p>Go certainly doesn&#x27;t succeed because of smug&#x2F;boring articles like this one. The potshot at Erlang early on (also cf. slurs on Rust and Haskell in some of these comments) betrays the same old &quot;we like it here in our cave&quot; bias of Go boosters whenever confronted with its glaring warts.<p>Go is a great choice for certain workloads, is reasonably fun to code in, and has great doc support on the web. I suspect however it&#x27;s popular also because it <i>isn&#x27;t</i> FP and doesn&#x27;t favor immutability. It plays well with the haters who refuse to understand how good GC&#x2F;list fusion&#x2F;stronger types&#x2F;better abstraction can make code <i>easier</i> to understand and <i>way</i> faster.<p>But the bottom line is no Google, no Go. Just like no Sun, no Java. It&#x27;s simply unbeatable to have a mega tech corp paying folks to write docs libs and patches. But it doesn&#x27;t save it from being yet another turing tarpit.
评论 #9713861 未加载
评论 #9714942 未加载
评论 #9714541 未加载
评论 #9713773 未加载
评论 #9713831 未加载
gamesbrainiac将近 10 年前
&gt; TL;DR Golang was explicitly engineered to thrive in projects built by large groups of programmers with different skill levels, and there is no larger such group than the open source community.<p>Very true.<p>This article hits the nail on the head. Most people say that they cannot &quot;express&quot; certain things in go, or have to jump through hoops to do it. The point of go is not to create a highly expressive language, but rather to create one that has a high enough abstraction to be productive but simple enough so that people coming from different backgrounds can acquaint themselves with it quickly.<p>In other words, it is a language for teams.
评论 #9711742 未加载
评论 #9711449 未加载
评论 #9712452 未加载
评论 #9711700 未加载
评论 #9712876 未加载
latch将近 10 年前
I&#x27;m a fan of Go and have been using it for a [relatively] long time across various large and small systems.<p>I really like it.<p>To me, what&#x27;s been abundantly clear is that: it&#x27;s a horrible choice for types of apps a lot of people are using it for. Specifically, systems where ror&#x2F;django&#x2F;express&#x2F;php have traditionally excelled at. I&#x27;d say &quot;CRUD&quot;, but that&#x27;s too narrow. The expressiveness and productivity of dynamic languages continues to awe me. This is particularly true for web systems that, on one end, deal with the object-relational mismatch and on the other transforms and outputs json or html.<p>Go&#x27;s great, but it feels like we&#x27;ve forgotten some of the pain-driven lessons Hibernate and their ilk taught us.
评论 #9712208 未加载
评论 #9712743 未加载
评论 #9712201 未加载
评论 #9712024 未加载
coldtea将近 10 年前
&gt;<i>To understands why Go is the way it is you need to know why it came to exist in the first place: &quot;The goals of the Go project were to eliminate the slowness and clumsiness of software development at Google, and thereby to make the process more productive and scalable. The language was designed by and for people who write—and read and debug and maintain—large software systems. source&quot;</i><p>The problem with this idea is that, for the exact same goals, there could be a much better design for the language and much better implementation of various details.<p>You don&#x27;t need to be Haskell or anything. Just Go + generics for example would result in a much cleaner language (no special casing for things like &quot;make&quot; for example), a vastly improved code library and data structures story, etc. This horse has of course been beaten to death (including by people working extensively with Go, so it&#x27;s not like some &quot;outsider&#x27;s misconception&quot; as some dismiss it).<p>If Go succeeds is because noone else with the same kind of visibility and resources tried to compete in this space (easy concurrency, static builds, fast compiles, static, fast-ish, decent batteries included etc).<p>You have e.g. Rust which is incomplete and too complex, Nim which is too niche, from very small vendor (a guy) and has some bizarro ideas, and that&#x27;s pretty much it. That said, Swift might make a dent in this area when its Open Sourced if it has nice tooling.
评论 #9711670 未加载
评论 #9711540 未加载
评论 #9713261 未加载
coldtea将近 10 年前
&gt;<i>Many critics I find though, fall into the second bucket. The answer to those critics is always the same: “Go is just not for you”. Some people see this attitude as stubbornness from the community, aversion to improve which will doom Go in the long run. They just don’t realize that some people want different things.</i><p>This trivializes all critique to &quot;to each his own&quot;.<p>That some people &quot;want different things&quot; doesn&#x27;t mean all things people want are equally valid.
pron将近 10 年前
Go seems to be attracting a lot of developers from Python, Ruby and Node because Go offers them the easy path to getting started that they place a premium on, combined with speed, but relatively few people from the order-of-magnitude-larger JVM world. Coming from Java I like that there&#x27;s a very similar language that I can use for command line applications (a JVM sore-spot) or a simple daemon -- both because it doesn&#x27;t require warmup and can be delivered as a single native binary -- but I just can&#x27;t think of giving up the JVM&#x27;s deep monitoring, low-overhead deep profiling[1], polyglotism[2], dynamic code loading and hot-swapping, and the awesome hacking power that comes with runtime bytecode manipulation[3] for long-running, important server applications.<p>[1]: Java Flight Recorder is the most powerful low-overhead profiler I&#x27;ve ever seen.<p>[2]: We use Java, Kotlin and Clojure all in the same project.<p>[3]: The ability to inject ad-hoc tracing code into your server and then take it out -- all while the server is running at full speed -- or to shadow binary dependencies so they don&#x27;t clash, or to use (or write) a time-travelling debugger is like having magic powers. Bytecode manipulation is ultimate hackability.
评论 #9711731 未加载
评论 #9711621 未加载
评论 #9711715 未加载
评论 #9711783 未加载
xyby将近 10 年前
Without a definition of &quot;succeed&quot;, this cannot be argued against or agreed to. Like every other language, Go will be used by some people and not used by other people.
评论 #9711474 未加载
modulus1将近 10 年前
Go&#x27;s success has me confused. My team enjoys using Go, but to me it feels like i&#x27;m a prisoner. The designer&#x27;s slavishly followed opinions are laser focused on reducing variation across go codebases. There&#x27;s definitely less to learn than most languages. Unfortunately, sometimes the blessed way of doing things doesn&#x27;t work well for your problem and not only are you left with a hammer to cut the wood, but making a saw is outlawed.
评论 #9711777 未加载
dawkins将近 10 年前
&quot;Go won’t let you abstract yourself in the foot.&quot; :)
评论 #9712124 未加载
评论 #9711915 未加载
fauigerzigerk将近 10 年前
<i>&gt;TL;DR Golang was explicitly engineered to thrive in projects built by large groups of programmers with different skill levels, and there is no larger such group than the open source community.</i><p>I think this premise could not be more wrong. The open source community is not a project team, and open source project teams are very likely much more homogenous and stable than teams working on commercial software.<p>Yes there may be non core contributors, but if contributions are not up to standard, they are simply rejected. If that means slower progress an open source project can live with that. A commercial project can not, because it has deadlines.
hyperpallium将近 10 年前
It&#x27;s an interesting language test, of how easy it is to understand an open source project.<p>Looking at github, the lines of code are usually easy to understand in C and java. What&#x27;s difficult is how the parts of the project fit together (which is <i>never</i> documented). Does Go help with that?
评论 #9711554 未加载
orian将近 10 年前
Isn&#x27;t the issue that people who generally like Go read and write articles like this? ;-) The same is said by PHP devs:)
评论 #9711509 未加载
sapek将近 10 年前
Whether you like Go or not depends on whether you think of software development as engineering or as craft.
评论 #9711719 未加载
评论 #9711532 未加载
gtrubetskoy将近 10 年前
Compiled to native binary, garbage collected, no JVM and not object oriented is why I like it.
评论 #9711709 未加载
评论 #9711455 未加载
DubiousPusher将近 10 年前
I highly recommend replacing any occurrence of, “Go is just not for you”, with &quot;Go is probably not the right tool for what you&#x27;re trying to do.&quot;<p>The former can seem, snide or condescending, even when that is 100% not the intent.<p>I write both C++ and C# frequently. I love both languages. But I deal with people who use either language exclusively and continually gripe about the other. And the proper response is, &quot;it&#x27;s probably just not the right tool for the thing you&#x27;re trying to do.&quot;
vorg将近 10 年前
&gt; <i>accept that they won’t change anything. The Go team has said time and again that the language is done for the foreseeable future. You are too late to the party. Some might cry about this, but this stability promise brings more long term benefits than any language improvement could. Breaking changes, even if for the better, are not always welcome</i><p>The promise of stability from a large software corp puts in place a solid language foundation people can rely on when building apps in the language. Someone building a successful app using the language shouldn&#x27;t be able to dictate future changes to the language based on their own needs only, ignoring smaller or less popular apps. Golang&#x27;s language spec is a big help with this.<p>When you&#x27;ve tried working with a language whose backers cancel work on a spec for 10 years, then tailor the language&#x27;s functionality for the one application they themselves are building, you appreciate the promise of stability. When the language&#x27;s backers open up their AST to programmer addons via annotations, then later duplicate the functionality of the most popular addon, you appreciate the backing company&#x27;s understanding that long term benefits come from nurturing the community.<p>When you see a backing company suddenly retrench all the staff working on a programming language, you appreciate that Google is using Golang internally and is unlikely to do the same. Although Golang was born of a Google internal need, let&#x27;s hope the needs of their own systems won&#x27;t dictate future changes <i>at the expense of</i> the external community, and that they keep their stability promise.
aroman将近 10 年前
&gt; Go won’t let you abstract yourself in the foot.<p>What a brilliant sentence.
评论 #9711714 未加载
BuckRogers将近 10 年前
&quot;TL;DR Golang was explicitly engineered to thrive in projects built by large groups of programmers with different skill levels, and there is no larger such group than the open source community.&quot;<p>This would almost be right, but Go has much poorer language interop than C due to the GC and non-C compatible ABI. This means unless we&#x27;re going to a monoculture of GoAllTheThings (not likely), Go will never succeed C as being the basis of fundamental open source community projects.<p>For myself, I was and remain mildly interested in Go as my next move off of Python(2). And still believe Go is a better move than porting to Python3- which as an aside makes no sense technically, but the coercion&#x2F;threats from the Python3istas are beyond reproach (as if the existing Python2 community is the problem), and set me solidly against it. Of this new generation of languages, Swift was always my ideal. Both in language and implementation. Now that it&#x27;s going to the server I can&#x27;t help but find the attraction of serverside Swift and getting in on the groundfloor of that ecosystem. While gaining skills in the language of iOS to be irresistible.<p>Count me in as one eager for Swift 2.0. I believe Swift is the language that is doomed to succeed. <a href="http:&#x2F;&#x2F;www.tiobe.com&#x2F;index.php&#x2F;content&#x2F;paperinfo&#x2F;tpci&#x2F;index.html" rel="nofollow">http:&#x2F;&#x2F;www.tiobe.com&#x2F;index.php&#x2F;content&#x2F;paperinfo&#x2F;tpci&#x2F;index....</a>
评论 #9712852 未加载
评论 #9713929 未加载
fishnchips将近 10 年前
Although Go was initially marketed as systems language it more often than not eats into Python&#x27;s market share rather than C++ or Java&#x27;s - at least in all places that I&#x27;ve seen it &#x27;in the wild&#x27; (eg. saw that 1st hand at Google, read about that at Dropbox). Coming from professional Java or C++ development Go feels lacking but it feels like an incredible power-up when it replaces a piece of Python (or Perl, or Ruby, I guess...)
_pdp_将近 10 年前
I am not quite sure I agree with this article. It&#x27;s like saying that C wont succeed because it lacks every single feature that is available in modern languages (I am not talking about C++ and above).<p>Go was designed to create low-level stuff with high-level language and it does not need features beyond that. It has enough features to satisfy some extreme low level tasks. If you want high-level programs then write them in your favourite scripting language. I prefer coffescript due to its expressiveness but I realise that t is not everyone&#x27;s cup of tee.<p>However, for low-level programming and where I know static compilation and performance is a key, I will go with go. Why? Because it will take me 10 times longer to do it in C. And although I like C, I will not kill myself to use it unless I am really have to.<p>P.S. my company has done some amazing stuff with go, docker, fleet and coreos in a very short time. I have no doubt it would have taken us much more time if we had decided to use something else.
jubei将近 10 年前
Is there any &quot;best practice&quot; Go, especially in terms of architecturing apps? I come from a long php background, and spent the past 3 weeks learning and prototyping a Go project. Looking at my code, I definitely have &quot;open source stage fright&quot;. Any links&#x2F;advice&#x2F;books appreciated.
评论 #9713629 未加载
ilurk将近 10 年前
I&#x27;m curious about two things.<p>(1) where does Rust fit in this?<p>(2) and if Go is lacking in the concurrency department and loses to Erlang in latency. Why don&#x27;t people use Erlang&#x2F;Elixir for servers and Python&#x2F;etc for client side?
评论 #9712011 未加载
评论 #9712762 未加载
评论 #9713806 未加载
评论 #9712145 未加载
istvan__将近 10 年前
This is a very light article with not too much information. Go already succeeded simply because Google uses it. This means all of the problems they need to solve in Go has decent support (net&#x2F;http etc.) and you can just use in your own projects, and this also means that the out of the box performance is decent. These are good enough reasons to use Go. If you are talking about language features I don&#x27;t think that Go is that amazing. Supporting CSP is a big win though.
andyidsinga将近 10 年前
this:<p><pre><code> &gt; Go won’t let you abstract yourself in the foot. </code></pre> aside from being amusing -- I like this, but can anyone confirm its true in practice with Go?
评论 #9713608 未加载
评论 #9712846 未加载
评论 #9712724 未加载
framp将近 10 年前
A language success is largely determined by marketing. Go will succeed because a lot of brilliant people are using it and it&#x27;s not bad. That&#x27;s exactly why node.js is where it is now, and PHP was cool back in the days.<p>That said, I&#x27;ll just leave this here: <a href="http:&#x2F;&#x2F;yager.io&#x2F;programming&#x2F;go.html" rel="nofollow">http:&#x2F;&#x2F;yager.io&#x2F;programming&#x2F;go.html</a>
charlieflowers将近 10 年前
God, this is a beautiful turn of phrase: &quot;Go won’t let you abstract yourself in the foot.&quot;
mshenfield将近 10 年前
I don&#x27;t quite buy that a pretty low level language reduces developer fright. In my mind Go is a replacement for C more than the next Python. In that respect it is still intimidating for developers who have never done or done very little low level programming.
评论 #9713485 未加载
0xdeadbeefbabe将近 10 年前
Plan9&#x27;s failure payed the karma points for go&#x27;s success. Duh.
stox将近 10 年前
Go is simply the follow on to Limbo. It is the product of many years of experience supporting the construction of large systems. Most of its roots are from Bell Labs.
justinhj将近 10 年前
This article seems to suggest that Go was designed as a language for large teams. Firstly it was designed as an research project and secondly I don&#x27;t think it does work for large teams.<p>The simple type system and lack of genetics makes code verbose. The dependency system seems to require everyone is on the bleeding edge, correct me if I&#x27;m wrong. The channel based concurrency is very elegant but appears to be too coarse grained for high performance programs that would otherwise use it.<p>That said I like the languages simplicity and do think it has it&#x27;s uses in the world. Just not large team, large project development.
评论 #9712776 未加载
shmerl将近 10 年前
To put it roughly, Go was made to appeal to Java developers as a better Java replacement. In contrast Rust was created to appeal to C++ developers as a better C++ replacement.
Dewie3将近 10 年前
Maybe these <i>programming in the large</i> languages don&#x27;t necessarily have to be fantastic for programming in the large, and in the long term. But they have to be great for this at least in the short term. So imagine that such a language shows itself to be good for making medium-scale applications in the first year (assuming that large-scale applications take longer to become &quot;large-scale&quot;). The code is uniform, people can easily get up to speed with whatever section they are working on, there are no <i>big</i> surprises - great. This language gets adopted in more projects because of the initial rite of passage, and some luck and marketing (hype and random factors seems to be given for new technology, in the short term). So more projects spring up following the same model. These also work great, and by now we have a handful of new, discovered concepts associated with learning and using the language. The language, ecosystem and implementations are still lean and easy to comprehend. And so some years pass.<p>Now this language is actually used for <i>large</i> applications. It&#x27;s still all gravy, the code bases are still uniform and easy to understand. People can easily be trained. More projects adopt this language, or even use it to build things from scratch. It gets applied to more domains. Years pass, and things that were unobservable in the beginning start to rear its head. They weren&#x27;t <i>non-existing</i>, but they were so minuscule in this large landscape (remember - big adoption of this language) that it was unobservable from the bigger picture. Now what was a problem for a few developers seems to be a problem for many people. For a while, they solve this pain point by educating about certain patterns to look out for and solve. This works for a while, but after a while more pain points become apparent. And like for the initial pain point, it is just not a pain point for a small group of ignorable developers, but indeed a systemic one. There seems to be something wrong. We can&#x27;t simply solve this pain point with education and applying patterns - we need <i>abstractions</i>. There is some murmur about this - the principal point about this language was to avoid over-abstracting things. We need to practice constraint. This works for a while, but after some time the concerned voices of the people advocating this kind of restraint gets drowned out. These limitations are just <i>too much</i> for people to deal with. So people start suggesting and inventing so-called <i>abstractions</i>. And pain points are relieved. After a while you have a whole cottage industry of these abstractions. And people&#x27;s day to day life with this language and its associated code bases are happier and more productive. On the other hand, there is more to learn now, and things aren&#x27;t straightforward any more. You can&#x27;t simply look up a library and have flat, easy to read code. You also need to learn the associated <i>abstractions</i>. You also notice that the technologies associated with these abstractions are getting kind of <i>big</i>. They are starting to take on a life of their own. And it seems like they don&#x27;t really <i>fit</i>. Some of them feel kind of shoe-horned in, as if there was no general slot for them already installed, it just had to be jammed in there.<p>Now, is this language good for large-scale development? The language is still easy to learn. Somehow. There was a bunch of additions up through the years to ease some pain points. Not all of jive as well with each other, or with the original language. But with some elbow grease, it is perfectly serviceable. Not to mention all the associated technology that cropped up to assist the language in its ascent - <i>that</i> is the hard part. So the language is not <i>really</i> easy to learn any more, with the associated things. But people know it, there are code bases to maintain and it has proven that it isn&#x27;t <i>useless</i>.<p>Is the language good for large-scale development? Doesn&#x27;t matter. It already won and is here to stay.
wavesum将近 10 年前
Destined to succeed might make better english.
评论 #9712154 未加载