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

科技回声

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

GitHubTwitter

首页

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

资源链接

HackerNews API原版 HackerNewsNext.js

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

Google's Go Programming Language Grows Up: Now What?

102 点作者 rohshall超过 12 年前

14 条评论

danenania超过 12 年前
I've been learning and trying out both Clojure and Go recently. While they clearly take very different approaches on many issues, I think they also have a surprising amount in common in their core philosophies. They both focus strongly on simplicity, removing boilerplate, performant and minimalist core data structures, and providing clean abstractions for parallelism.<p>The split in how each goes about targeting 'simplicity' is quite interesting, and seems close to the heart of each language. In Go, simple seems to mean: obvious, intuitive, unclever, and familiar. Clojure's conception is much headier: simplicity isn't accomplished through familiarity and comfort, but through the power and flexibility to create appropriate abstractions, and the discipline to avoid dangerous ones. The most immediate consequence, for a newbie, is that Go feels a lot easier to learn, while Clojure is more mind-expanding and abstract. In Go, simplicity is easy. In Clojure, the simplicity is deeper and perhaps more theoretically pure, but reaching it can be quite a challenge.<p>My preliminary feeling so far is that each feels like a very clean, modern language and is basically superior to other languages I've used (Ruby, Python, C, js) by every important metric except maturity of community and libraries, and each will have its place. Go's lack of cleverness probably makes it ideal for more run-of-the-mill systems with a lot of straightforward io, where organization, maintainability, and baseline performance are more important than development of powerful algorithms, while Clojure will be a better fit when cleverness is desired either to solve difficult problems or for rapid feature development (a la pg's Beating The Averages). I could also see them potentially working quite well in tandem for a system that spans both those categories.<p>One more thought: as much as I like Clojure and understand the pragmatism of targeting the jvm, Go's ultra-simple, ultra-fast runtime, along with libraries and a community that embody a similar spirit, really is <i>such</i> a breath of fresh air compared to the jvm world and even the ruby/python worlds. In this realm I think Go beats Clojure at its own game. Thanks to the more 'difficult' choice of starting a fresh platform rather than leveraging an existing one, Go's whole ecosystem and development experience now share a unifying philosophy, and every aspect of working with Go is suffused with what makes Go great.
评论 #4550344 未加载
jeremyjh超过 12 年前
This is really getting a bit overheated.<p>I think I understand where the Go team is coming from, but there is so much hype from other quarters that I think is at best premature.<p>I think Go will be a fantastic alternative to C for "systems" programming, once it matures. I think this was one of its most immediate original goals, but really it is not yet ready to do even that. Two main reasons it is not ready for that is that performance is not <i>yet</i> there though I think it will get there; second reason is that it has no support for dynamic linking or code loading. You can't write something like Apache, or even Nagios in a platform that has no support for loadable modules. Still I think there are LOTS of applications where these constraints would not be an issue.<p>So then we have all this hype and people doing things like building web applications in Go and calling it the next Node.js or Ruby or Python and frankly this is just stupid. Despite some claims it has nowhere near the expressive power of those languages. It is statically typed but has no Generics - and there are quite a few use cases where there is no answer(<a href="https://groups.google.com/forum/#!topic/golang-nuts/PYJayE50JZg[1-25]" rel="nofollow">https://groups.google.com/forum/#!topic/golang-nuts/PYJayE50...</a>) and you will just have duplicate code.<p>It polymorphism but no inheritance - and the way interfaces and composition works while still fairly powerful is not at all what an OO programmer would expect(<a href="http://xampl.com/so/category/software/golang/" rel="nofollow">http://xampl.com/so/category/software/golang/</a>) just naively reading about this feature. Whatever you want to say about the benefits of simplicity, this is LESS powerful than any OO dynamic language. Go's closures are nice, but aside from that on what basis can any other claims be made about its expressive power?<p>In fact, the language is intentionally very, very limited. They want large teams of mediocre programmers [1] to produce code that is very supportable. Everytime someone in the lists brings up a "why don't we have" question all the answers revolve around this premise, that the language becomes "too complicated" if you have crazy features like generics. So it seems Go is optimized to satisfy the angst of systems programmers who have to work on C code that is thirty years old and been maintained by dozens of people. I get it, but that doesn't mean its really a good language for hackers to use to build the latest social network for people who like cats.<p>Ok so concurrency. Yes Goroutines are smart. Channels are smart. These are great features. Scala can do the same thing (and more elegantly) with it's Actor constructs. The same thing can probably be done in other languages such as Ruby (<a href="https://github.com/igrigorik/agent" rel="nofollow">https://github.com/igrigorik/agent</a>). Its nice that this feature is in Go from the beginning, but its going to make its way into other platforms as well.<p>Performance. Well...lots of blog articles just keep repeating the mantra of "native code" as though it automatically means something. It doesn't. C isn't just fast because it generates native code, it is fast because it's compiler has been optimized for decades. Go doesn't have that today. In fact today, Go is slower than Java and Scala based on both Google's benchmarks (<a href="http://www.readwriteweb.com/hack/2011/06/cpp-go-java-scala-performance-benchmark.php" rel="nofollow">http://www.readwriteweb.com/hack/2011/06/cpp-go-java-scala-p...</a>) and the language shootout (<a href="http://shootout.alioth.debian.org/u32/which-programming-languages-are-fastest.php" rel="nofollow">http://shootout.alioth.debian.org/u32/which-programming-lang...</a>). Go will get there almost certainly, or at least very close, but it isn't there today.<p>Today if you want a static, fast language with good concurrency and an incredible standard library and extended library ecosystem then you want Scala I think. If you want a powerful, expressive language for quickly building web applications then you want Python, Ruby[2] or Node.js or similar. If you want a language is actually very fast and with incredible libraries you want C/C++.<p>I really do not hate Go. But it is not yet ready to replace hardly anything in my opinion.<p>edit: [1]You are right. The "mediocre programmer" comment is really out of line and a major distraction. I guess I actually think this IS a feature of Go: more maintainable code than C/C++ from mediocre developers. I'm bitter and tired ofdebugging twenty-year old C programs and I wish they were all written in Go. I shouldn't read that into Thompson's or Pike's intentions though.<p>[2]May brain stopped working here - I meant Ruby not Java.
评论 #4548156 未加载
评论 #4548647 未加载
评论 #4548223 未加载
评论 #4548249 未加载
评论 #4548064 未加载
评论 #4548308 未加载
评论 #4548288 未加载
davidw超过 12 年前
I am / We are considering using Go, but I'm a bit reticent about its maturity compared to Erlang, which is a very, very solid system. The 32 garbage collection issue is a big question. Arm support is another. Also, all the extras Erlang gives you in terms of writing robust systems look pretty attractive.<p>That said, I'm about 99% that Erlang will always remain a niche player, along the lines of Smalltalk and Lisp, whereas Go has a shot at 'the big time'. That's something to keep in mind in terms of hiring people and getting other people up to speed on the language. Go is something that other people will look at and 'get' a bit quicker than Erlang.<p>BTW, interesting article on Go concurrency vs Erlang concurrency: <a href="http://www.informit.com/articles/article.aspx?p=1768317" rel="nofollow">http://www.informit.com/articles/article.aspx?p=1768317</a>
评论 #4548268 未加载
评论 #4548506 未加载
esolyt超过 12 年前
"Now that Google has released a stable version, and is deploying support on Google App Engine, it's likely to gain even more traction."<p>I think what Go actually needs is another popular framework so that the language can be used without depending on Google's App Engine and it's unstable pricing.
评论 #4548012 未加载
评论 #4549091 未加载
lucian1900超过 12 年前
Go's GC is in fact much, much worse than the JVM's. One may have less memory issues because Go tends to generate less garbage, though.
评论 #4547956 未加载
评论 #4548033 未加载
评论 #4547932 未加载
评论 #4547935 未加载
aartur超过 12 年前
I don't like that Go has builtin generic collections, but doesn't allow programmers to build their own. It feels more like some corporate/"4GL" programming language than a hacker's/"real" programmer's one. Maybe lack of generics is not so important, but it shows designer's attitude towards language users.
评论 #4548019 未加载
biomechanica超过 12 年前
It's seems like there's been a lot of posts about Go lately. Maybe I'm delusional..<p>I find Go to be nice to work with. I'm just starting out in it so I'm not exactly proficient yet, but it feels a lot easier to program with against say, Java.<p>In regards to the GC. I saw a post a little while ago made by Rob Pike, I think (could be wrong) about how there are many improvements coming where they see 50% speed ups (sometimes even more). So, as young language I think Go has come pretty far and more is to come.
评论 #4547965 未加载
评论 #4547944 未加载
bkirkby超过 12 年前
i've not had a ton of experience with Go, just some coder challenge type stuff, but i love almost everything about the language. it has the feel of old skool C, but greatly improved and upgraded.<p>the one thing i hate about Go is how it does exported identifiers. in order to make a variable/method available to other packages, you must start the variable name with an uppercase letter. this is the only way to export identifiers which means the exporting is a bit obfuscated.<p>giving meaning to the first letter of a variable name is filled with potential problems:<p>1. people will inadvertently export properties simply because they chose to name them with uppercases 2. in some cases, you will need to force this case sensitive language to be case insensitive. ex: a json property named "address" needs to unmarshal into a Go variable named "Address" 3. i don't have this concern personally, but i wonder about coding in languages that don't have uppercases. (actually, it's prolly legit to force them to code in english i suppose)<p>i've read the Go engineers are extremely happy with this feature, so i guess i'm going to have to get used to it and the bevy of problems it creates if i'm going to continue using it.
评论 #4549468 未加载
rbanffy超过 12 年前
Just out of curiosity, is anyone using Vala? I was asked to do a little bit of research into alternatives to build a cross-platform chat client and, along with the more obvious Java, C++/wx, Objective-C/OSX/GNUStep and C#/.NET/Mono stacks, I found Vala as a possible option.
muruke超过 12 年前
I haven't written anything real in Go yet, but there is a lot of articles about it, and many parts of it do appeal to me. I like how they didn't write another language for the JVM, I like the c inspired syntax, I like the concurrency model they have, etc. It also seems to be getting a lot of praise in web development circles.<p>But am I the only one that cringes at going back to writing &#38; and * for passing parameters etc. for web development? I know there is sometimes a need for really managing memory but... I'd love a simplistic language built around the ideas of Go (small runtime, fast, type safe, compiled etc.) for building web apps.<p>Time to download Go source and tinker...
kennethh超过 12 年前
What web framework should one use with Go?
评论 #4547960 未加载
评论 #4547963 未加载
评论 #4547983 未加载
评论 #4549657 未加载
sgdesign超过 12 年前
Like everybody, I've been hearing good things about Go lately. But although I'm curious about the language, its homepage (<a href="http://golang.org/" rel="nofollow">http://golang.org/</a>) doesn't make a great impression. It looks very amateurish and unappealing.<p>And you can pretty much say the same thing about <a href="http://www.scala-lang.org/" rel="nofollow">http://www.scala-lang.org/</a> and <a href="http://clojure.org/" rel="nofollow">http://clojure.org/</a><p>It might not seem like a big deal, but it would certainly not hurt a language's popularity to have a slightly nicer site. Unless of course these languages <i>don't</i> want to become popular.<p>Edit: I actually can't find a single language site that looks good. So maybe bashing Go for this is unfair, although I still find the Go site particularly bad.
评论 #4552336 未加载
评论 #4548278 未加载
评论 #4548237 未加载
评论 #4549735 未加载
评论 #4552623 未加载
评论 #4548425 未加载
scriptproof超过 12 年前
"programming to that in a way that is nonblocking". It is strange that go it compared to Node.js and this sentence is false. Each function has a Sync version to program in "blocking" way.
评论 #4548291 未加载
webreac超过 12 年前
It is too sad, they choose the name of my favourite game to name a language. Now it is near impossible to make google searches about game of go.
评论 #4547977 未加载
评论 #4547971 未加载
评论 #4548192 未加载
评论 #4548002 未加载