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

科技回声

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

GitHubTwitter

首页

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

资源链接

HackerNews API原版 HackerNewsNext.js

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

Go is on a trajectory to become the next enterprise programming language

6 点作者 kevingoslar大约 6 年前

2 条评论

taylodl大约 6 年前
What do you mean by 'enterprise'? If you mean an organization in the Fortune 500 whose primary products do not include IT products and services then I seriously doubt it. Java has been #1 on the TIOBE index for the past 15 years. That's a HUGE amount of inertia in tooling, existing application portfolios, know-how, etc. such that Java will probably be the #1 enterprise language for at least the next 10 years. After that it's anyone's guess but odds are it won't be Go.
verisimilitudes大约 6 年前
I&#x27;m inclined to believe Go would be left to languish as Plan 9 and other projects from Bell Labs are, were it not for the support of Google. Go is certainly designed as other <i>enterprise programming languages</i> are, though, which is to write they&#x27;re designed to weaken programmer agency.<p>&gt;Many languages are stronger in individual areas, but no other language scores so consistently well when looking at all of them combined, especially in regards to large-scale software engineering.<p>I use a number of wildly different languages, including Common Lisp, APL, and most recently Ada; each of these languages is lacking things the other has, but it also vastly more suited to other tasks than the rest. I&#x27;ve never used Go. Unlike these three languages I&#x27;ve mentioned, which have perfectly good reasons for lacking whatever it is they lack, Go very often has poor reasons or perhaps even no reasons, although I don&#x27;t skulk around the mailing lists or whatnot.<p>&gt;Go focuses on alleviating these large-scale engineering pains, sometimes at the cost of making engineering in the small a bit more cumbersome, for example by requiring a few extra lines of code here and there.<p>While reading this article, I&#x27;ve been left to wonder &#x27;&#x27;Why not Ada?&#x27;&#x27; and the answer seems to be that Google simply doesn&#x27;t care about Ada. This is exactly the manner of thing Ada was created for.<p>&gt;Many people are surprised that Go doesn’t contain concepts they love in other languages. Go is indeed a very small and simple language that contains only a minimal selection of orthogonal and proven concepts. This encourages developers to write the simplest possible code with the least amount of cognitive overhead so that many other people can understand and work with it.<p>A more cynical view is that Go is designed to use programmers as unintelligent implementing machines, which is why it&#x27;s so opinionated. Its opinions have little or nothing to do with good programs and apparently everything to do with preventing the damage any single fool they want to use can cause or, worse, prevent a new hire who isn&#x27;t a fool from writing a good program that makes them more valuable than their peers and harder to fire. There&#x27;s no macros in Go, only the same thing, everywhere, no matter how poorly suited it is to the problem. If everyone writes Go the same, it&#x27;s easy to fire and interchange employees without friction.<p>&gt;Good code is obvious, avoids cleverness, obscure language features, twisted control flow, and indirections.<p>I&#x27;d like an example of such &#x27;&#x27;good code&#x27;&#x27;. Simple code for complex problems is often &#x27;&#x27;clever&#x27;&#x27; and may even take some time to understand. This seems to contradict with earlier parts of the article.<p>&gt;An example is error handling. It would be easier to just let exceptions interrupt code at various points and bubble up the call chain. Go requires to handle or return each error manually. This makes it explicit exactly where code can be interrupted and how errors are handled or wrapped. Overall, this makes error handling more cumbersome to write but easier to understand.<p>I think Ada does it rather well. The entire point of exceptions is handling <i>exceptional</i> circumstances and it&#x27;s much more pleasant to have such handling in one place rather than everywhere it can happen. Not only that, but return values can be ignored by accident, which is a major issue.<p>Now, clearly, avoiding exceptional circumstances wherever possible seems to be the best option, but when that&#x27;s not feasible, exceptions seem a rather good solution to this issue.<p>&gt;Go is so small and simple that the entire language and its underlying concepts can be studied in just a couple of days. In our experience, after no more than a week of training (compared to months in other languages) Go beginners can make sense of code written by Go experts and contribute to it.<p>I&#x27;d think Forth is simple. Go doesn&#x27;t seem to be. There&#x27;s nothing wrong with new programmers being able to understand expert code, but this does betray that underlying feeling that Go is an attempt to de-skill programming.<p>A simple language isn&#x27;t equivalent to a language that is good for writing programs in. Ofttimes, a lack of edge cases in the world of the language doesn&#x27;t correspond to a lack of edge cases in real use. Take a look at Ada for a counterexample; the rules may not have a nice technical explanation, but the corresponding real world explanation is very simple, because it&#x27;s usually to prevent some manner of error.<p>&gt;The different programmers feel more at home in each other’s code bases.<p>A major aspect of &#x27;&#x27;programming in the large&#x27;&#x27; is not needing to see other people&#x27;s code, but just the interfaces to it that are exposed.<p>&gt;Go was written in the age of multi-core CPUs and has easy, high-level CSP-style concurrency built into the language.<p>Multiple threads of execution is, again, something Ada has been doing rather well for decades, with its tasks and protected objects and whatnot.<p>&gt;Taken as a whole, they position Go as an excellent choice for large development projects looking for a modern programming language beyond Java.<p>Sans the standard library (Does Go actually have a real standard?), every advantage of Go listed seems to reasonably apply to Ada, whereas Ada also lacks many of the disadvantages. Ada can run in a GCed environment, but is also suited to real-time computing, as two examples.<p>For a good example of my criticisms, take a look at this:<p><a href="https:&#x2F;&#x2F;tech.slashdot.org&#x2F;story&#x2F;17&#x2F;01&#x2F;03&#x2F;1924218" rel="nofollow">https:&#x2F;&#x2F;tech.slashdot.org&#x2F;story&#x2F;17&#x2F;01&#x2F;03&#x2F;1924218</a><p>It&#x27;s my understanding Go lacked a proper mechanism for determining time and many people critiqued this, but it wasn&#x27;t considered an issue until someone important was hit by it. This is a good example of the problems caused by a language that is not only uncustomizable by the users, but is designed by people who don&#x27;t care and won&#x27;t care. Unless you&#x27;re someone, Google doesn&#x27;t care about what you think and the language certainly doesn&#x27;t, considering it is designed at every point to take away programmer choice.<p>As is usual, here&#x27;s the Rob Pike quote:<p>&#x27;&#x27;They&#x27;re not capable of understanding a brilliant language, but we want to use them to build good software. So, the language that we give them has to be easy for them to understand and easy to adopt.&#x27;&#x27;<p>The only &#x27;&#x27;philosophy&#x27;&#x27; these things espouse is that the computer isn&#x27;t a tool for leveraging the mind.