24 ms·
Will Go be the new go-to programming language?
- deleted 14y ago[deleted]
- zackmorris 14y agoI can't use Go until they fix the whitespace bug: http://zackarymorris.tumblr.com/post/26701252898/a-mistake-in-go http://zackarymorris.tumblr.com/post/26701252898/a-mistake-i... But other than that, it looks like a very tasteful language and I want to use it for some parallel computation experiments since they make it so easy to spin off tasks.
- thebigshane 14y agoWow... I don't understand diving into a language like this without reading about or looking at other source code already written in the language. This is not a bug! Golang enforces certain formatting, it is very opinionated and the authors are very upfront about that. http://golang.org/doc/effective_go.html#formatting http://golang.org/doc/effective_go.html#formatting Also, you can use the `gofmt` tool (when running Go on your local machine) to help you learn what Go prefers if you don't want to read all of the excellent documentation on the site. [EDIT: I see you already know about this tool but I'll leave this comment here for others]
- callahad 14y agoRules about whitespace seem like an awfully superficial reason to dismiss an entire language. Do the other benefits not outweigh that?
- thebigshane 14y agosummary: Click-bait title, content-free article, great language, excellent conversation in (HN) comments.
- thebigshane 14y agoOh, and here's a pretty good comment on the article regarding static vs dynamic typing: eamonnerbonne Thursday, September 13 2012 It’s a night and day difference. Let me try a writing analogy with Word + Notepad. Say you’re trying to write a text for a particularly picky client that will reject your text if you make any mistake or use any unclear phrase. Then dynamic typing is like Notepad: you better be careful, have lots of proofreaders, and expect to have your text rejected often. And when you print it, it’s in a slow-to-read monospaced font. Static typing is like Word with all the grammar checking turned up to 11 (it won’t let you print or email any text with what it thinks is an error). It’s harder to learn, and sometimes your PC runs slowly, and the grammar checker will find lots of irrelevant stuff, and to keep it happy you might need to change your style, but it *will* make certain types of error irrelevant (e.g. spelling), and occasionally catch more complicated mistakes too. Also, as a bonus that might or might not be relevant, word prints in a font you can read much more quickly. The point being: they’re totally different ways of doing things. [http://gigaom.com/cloud/will-go-be-the-new-go-to-programming-language/#comment-994342 http://gigaom.com/cloud/will-go-be-the-new-go-to-programming...]
- realrocker 14y agoThe following features make Go as the "go-to" language for me: 1.Coroutines, Channels and Select: Concurrency with built in synchronization and communication is accessible(especially if your are new to concurrent programming) enough to handle "most" of the grunt work. 2.gofmt: Formats your code for you. No more debates(procrastination) on that. 3.godoc: Generates documents. No more looking for the best 3rd party tool and wasting time. 4. Defer and Close: Helps you to do better post-operation tasks i.e better resource management. 5. Error Handling: Multivalue returns. 6. Type Hierarchy: No type hierarchy exists in the conventional sense. 7. Slices & Maps: Just two of them, and that's why I love it. 8. Brevity and Readability: Clutter free syntax. WYSISWYG language. 9. Philosophy of Exclusiveness: This is most important non-feature which makes Go different and exciting. Go's vision is to be an exclusive programming paradigm rather than being an inclusive one. In this Google I/O video: http://www.youtube.com/watch?v=sln-gJaURzk http://www.youtube.com/watch?v=sln-gJaURzk, Robert Griesemer speaks about an incident that how in a "D" programming conference, the developers intended to include a new programming paradigm in the future. This is what sold it for me as I care more about how the language will grow instead of what new cool features will come in. Performance is a contentious issue. In an ideal world, performance would just depend on the platform and the language, but in reality it also depends on the skill and idiosyncrasies of the programmer. For me, that is a non-issue. Quick Reference to Go talks: http://code.google.com/p/go-wiki/wiki/GoTalks http://code.google.com/p/go-wiki/wiki/GoTalks
- hfs 14y agoSpeaking as an intermediate programmer, I've found Go to be my language of choice for a lot of tasks that, in previous years, I would have relegated to C, bash scripts, or even PHP. It is a very versatile language, and one of the easiest to work with in terms of flexibility.
- TylerE 14y agoIt's close. The tooling is really user-friendly, which is a big win. Add some sort of decent generics and you're really close. A top-class GUI toolkit would be good too.
- kitsune_ 14y agoI feel like not including generics is a huge oversight. Also, the way many go aficionados discuss this over at golang-nuts put me off a great deal.
- azth 14y agoHave you checked out Rust (http://rust-lang.org http://rust-lang.org)? They seem to be closer to what Go's original goals were, with generics, proper RAII, etc.
- sanderjd 14y agoWhat is an example of a use case for generics that can't be done, or is significantly less convenient to do, with interfaces? It sounds like there is at least some thought that generics may be included at some point, but I really haven't missed them thus far.
- lmkg 14y agoIt's not that there's a lot of things that you flat-out can't do, it's that you can't do those things in a type-safe manner. The type system isn't capable of representing what you're trying to do. This seems like an odd omission in a language that otherwise has static typing. I suspect this is why a lot of people who've jumped on the Golang bandwagon come from Python & Ruby: they're already used to no compile-time type safety, so they're not missing anything. For people who like type systems and have a style of programming that relies upon them, Go doesn't give them the tools they need to be productive. In Steve Yegge's terms: C++ is a pretty software-conservative update to C (it even has backwards-compatible syntax). Meanwhile, Go is a pretty software-liberal update (slightly to the right of Python). G simply does not support a software-conservative programming style. Consequently, Go's adoption has mostly come from software-liberal communities.
- jph 14y agoYes. :) I'm using it now, and it feels better to me than Java and C/C++. The language is cleaner and the toolchain is very smooth. The new Go Revel framework (by HN user robfig) looks especially promising for web MVC apps: http://robfig.github.com/revel/ http://robfig.github.com/revel/
- deleted 14y ago[deleted]
- Yuioup 14y agoYes. Combined with Dart and Google has their strategy for leaving Java and Firefox in the dust.
- viseztrance 14y agoI doubt dart will ever gain the momentum that go currently has.
- agilord 14y agoit is really early to bury a tool that has just started to take some shape. why do you have doubts?
- sigzero 14y agogo has momentum? I am not sure I would go that far.
- slurgfest 14y agoGo certainly has buzz. I keep thinking I should get around to doing a real project with it, then I get irritated by the strident advocacy and put it off again. For purposes which seem to call for Go I can easily just go back to C. Which is already beyond mature and plays nicely with almost any non-JVM language.
- EwanToo 14y agoIt's certainly the new go-to programming language for blog posts about programming languages :) It's a very nice language, I like it a lot, but if there's one thing we all should have learnt over the last few years, it's that no programming language is the right choice for every task.
- tsahyt 14y agoI think Go has big potential, especially with those who now code C++ or Java but also with some users of dynamic typing languages. I have a feeling Go is here to stay for a while.
- Kilimanjaro 14y ago"C will always have its place but Ruby and Python code bases will go to Go." Not in the web world. Go will take programmers from the C/Java camp, but not many from the ruby/python camp. Not even one in a hundred startups will use Go as their main programming language. Ask PG to confirm. I am an early golang user and once in a while play with it to try new stuff, but still coding everything else in python. To answer the question: Yes for systems work, No for web work.
- stevvooe 14y ago"I was asked a few weeks ago, "What was the biggest surprise you encountered rolling out Go?" I knew the answer instantly: Although we expected C++ programmers to see Go as an alternative, instead most Go programmers come from languages like Python and Ruby. Very few come from C++." - Rob Pike (http://commandcenter.blogspot.com/2012/06/less-is-exponentially-more.html http://commandcenter.blogspot.com/2012/06/less-is-exponentia...)
- EwanToo 14y agoStrangely, I think almost the opposite - I think it'll take a lot of "scripting language" tasks, but not much of the system programmers jobs. Coming from a scripting language background, Go feels like a step forward in performance, without many of the headaches of C++ or Java. But speaking to people who write C++ for a living, they see little or no use for go for them, as they need either the performance or flexibility of a lower level language like C++ - that's why they haven't moved to an alternative a long time ago.
- michaelhoffman 14y ago> Betteridge's Law of Headlines is an adage that states, "Any headline which ends in a question mark can be answered by the word 'no'". http://en.wikipedia.org/wiki/Betteridge%27s_Law_of_Headlines http://en.wikipedia.org/wiki/Betteridge%27s_Law_of_Headlines
- sp332 14y agoThere is no answer in this article, but the evidence given says "maybe".
- jpdoctor 14y agoIs Betteridge's Law of Headlines Correct?
- tptacek 14y agoMuch better that we all recite this message board trope than talk about golang. After all, there might be 1 or 2 people left in the world who haven't already heard it.
- michaelhoffman 14y agoAnd there might be 1 or 2 people left on Hacker News who haven't already heard of Go.
- xtdx 14y agoAnd that's why the link goes to an article discussing usage of Go instead of the golang homepage.
- polshaw 14y agoIs there a law about people always quoting a law from wikipedia?.. Betteridge, Poe, Godwin, Dunning-Kruger.. it is getting just as old as the terrible blog post titles that provoke them them. This is not really even such a ridiculous proposition, either- certainly worthy of discussion.
- erichocean 14y agoI'd like to see Cassandra implemented in Go (currently its Java/JVM-based).
- kingkilr 14y agoWhy?
- erichocean 14y agoMainly to see if it would have better GC ability than Cassandra. I love Cassandra, and the JVM is solid too, but the "stop-the-world-pause" in it's current garbage collectors truly blows. All of that fast latency is for not if the JVM decides to spend a few seconds churning through garbage. :( I've looked into Azul's Zing JVM, but it's basically only for beefy hardware (16+ cores and 32GB+ RAM), and it's also crazy expensive.
- pjmlp 14y agoCurrently most commercial JVMs beat down Go's GC with hands down, specially in 32 bit machines.
- masklinn 14y ago> Mainly to see if it would have better GC ability than Cassandra. Considering the naïvety of Go's GC (a non-generational, non-compacting, conservative, stop-the-world and broken-on-32b[0] mark&sweep)... I would tend to bet against it way sooner than on it. And remember that goroutines use shared memory, so you can't have an emergent concurrent GC as in Erlang. [0] http://utcc.utoronto.ca/~cks/space/blog/programming/GoLang32BitProblem http://utcc.utoronto.ca/~cks/space/blog/programming/GoLang32... https://groups.google.com/forum/?fromgroups#!topic/golang-nuts/qxlxu5RZAl0 https://groups.google.com/forum/?fromgroups#!topic/golang-nu...
- EwanToo 14y agoI've never used Cassandra, but from what I'd read about Netflix and other's use of it, everyone used at least 32GB of RAM in each node? Am I totally wrong?
- markmm 14y agoIt's all about the libraries, Python and C for example have libraries/bindings for most things, e.g. Postgresql, ZMQ, Json etc. Google could invent the best programming language ever but without _mature_ _robust_ libraries it is pretty much useless.
- tptacek 14y agoGo has a pretty decent standard library. http://golang.org/pkg/ http://golang.org/pkg/
- markmm 14y agoYes it looks good, but what about mature 3rd party libraries?
- reactor 14y agoIts a good opportunity to contribute!
- Jabbles 14y agoGood software takes time. Asking a new programming language to have "mature 3rd party libraries" is a bit harsh. You are, of course, correct in that the variety of libraries available in Go is more limited than older languages, but I have hope that it will change rapidly. http://www.joelonsoftware.com/articles/fog0000000017.html http://www.joelonsoftware.com/articles/fog0000000017.html
- markmm 14y agoI am not asking it to have anything, the article is insulating that GO is the new go to language, it is not because it doesn't have mature and comprehensive libraries. When I make a decision to use a particular language I don't wan't to handicap myself, you need as much edge as possible. In 10 years maybe Go will have a vast array of mature libs but until then I shall be choosing Python and C.
- kodablah 14y agoCan anyone confirm that 32-bit problems still exist concerning memory leaks and cgo? If so, this would confirm that it isn't a cross-platform "go-to programming language".
- Jabbles 14y agoYes. The speed of development is far better than any other language I've experienced. I use it as a replacement for C++ and Bash, a statement I don't think you could make about any other language. Apart from the lowest-level kernel work and the highest-performance code, I think Go will become the NBL. Even on the subject of performance, Go is improving quickly, and if you're using it as a replacement for, say Python, your performance will be substantially improved anyway. Its simplicity is astonishing. Very few things will surprise you whilst coding, although a few topics take a while to learn. I know many hackers try to work in accordance with the phrase "Perfection is achieved, not when there is nothing more to add, but when there is nothing left to take away.". I cannot think of anything Go has that it doesn't need. Not even goto :P http://www.quotationspage.com/quote/26979.html http://www.quotationspage.com/quote/26979.html http://golang.org/ref/spec#Goto_statements http://golang.org/ref/spec#Goto_statements
- ajross 14y ago> The speed of development is far better than any other language I've experienced. No, it isn't. Here's the proof: someone has said exactly that about, and I'm really not kidding, every newly popular language over the last 20 years. They said it about Java. About Python. About Ruby, and CoffeeScript and Clojure and Haskell and... Yet the Great Leap Forward in programming productivity hasn't arrived. And Go won't bring it either. Go no doubt improves your speed of coding. And being a new and different toolbox it's more fun, so it makes your coding more engaging. You "feel" more productive. But your hard bugs are still hard. And your maintenance hassles are still hassles. And your bad designs are still bad. That stuff is what takes time, not banging out your code. Programming languages can make the easy stuff easy. They can't fix our own stupidity. (To be clear: I'm not saying Go is bad, it actually looks like a ton of fun to me, though I haven't had the chance to really kick the tires yet. But don't attribute to it properties it doesn't have.)
- redbad 14y ago> someone has said exactly that about, and I'm really not > kidding, every newly popular language over the last 20 > years. That's probably true, and I grok your point, but pretty much everyone who's using Go in a production environment cites speed of development among the major, top-N reasons they're using the language. Past a certain threshold, there's something there that can't be hand-waved away. > Programming languages can make the easy stuff easy. > They can't fix our own stupidity. One of the neat things about Go, in my opinion, is that it converts a lot of "hard stuff" to "easy stuff", especially in the domain of concurrency, simply by the nature of its idioms.
- sigzero 14y agoI don't see it happening in the near future but it might.
- new299 14y agoThis is a terrible article, with no substance. I'm baffled as to why anyone would up vote it, other than "because it's about Go and I like Go".
- jongraehl 14y agoMany people don't really read the articles, I'd guess. This article really is devoid of insight.
- soapdog 14y agoFor those wanting to learn more Go I recommend this online book: http://www.golang-book.com/ http://www.golang-book.com/
- conradfr 14y agoIs Google behind all this hype ? There isn't a day without a Go article somewhere.
- mhd 14y agoFor small ad-hoc multi-processing servers that web shops are writing. Maybe, that seems like a good use case. Not as exotic as Erlang, and not a very demanding environment. No big chance for enterprise or academia. And I believe that for ordinary "check this, forward that" backend programming, Ruby, Python and Perl will still remain staples, with a few percentage points shifting back and forth, as usual. Rails didn't end Python. On the other hand, I wouldn't shed a tear if it would eat up the majority of node.js' marketshare.
- eckyptang 14y agoEnterprise here. We're knocking huge monolithic applications sitting on CLR and JVM processes into greater numbers of smaller stand-alone components (SOA style). Go fits here very well indeed. Our authentication, filestore, directory services, messaging and web front end are all easy targets.
- ekm2 14y agoAs an absolute amateur in programming i was surprised that i could master Go syntax(in the sense of not having to check back in the notes) in under 2 hours of practice.
- taw9 14y agoGo is awesome, but why must we limit ourselves to one language?! My dev plan used to be Python for rapid prototyping and C for speed optimization. With the advent of Go, I find I'm moving the infrastructure-level Python work into Go and replacing many of the C-oriented middleware tasks with it as well. I'm sure this will evolve as the libraries grow, but I don't see Python & C going away. Nor do I think this is the vision at Google. I suppose this is what is meant by "systems language". I think Go could end up being the under 35-generation's version of Lisp (in terms of love affair with language structure, etc.).
- kingmanaz 14y agoThings Go got right; 1. Go doesn't discard the last 40+ years of programming history. Ints, chars, arrays, pointers, structs -- in addition to minimalist types that build on these -- are at the heart of Go's lexicon. 2. Following off of point 1: C and C++ source code and algorithms are easily translatable into Go because they look like Go. 3. Following off of point 2: Because old C/C++ code looks similar to Go, Go's libraries will soon number C/C++. 4. A well thought-out, minimalist toolchain. Working with "go install", vim, and gocode is like dancing in the clouds when compared with the morass that is Eclipse or Visual Studio, let alone C/C++ and its makefiles. 5. Go's object-orientation is done right. Go strongly emphasizes "has-a" relations and eschews the "is-a" relations that are prevalent in C# and Java. To see the effect this has on code readability, look at Go's documentation. For example, http://golang.org/pkg/database/sql/ http://golang.org/pkg/database/sql/ ...scanning one page tells one all that's needs to be known about a package. Go's objects ride just above atomic data structures. There is not a five-mile chain of object dependencies and corresponding taxonomy clouding one's understanding as in C# or Java. 6. Go's channels give the programmer their very own ksh/bash built right in to the language. Admittedly, this is an oversimplification, but piping program units together is a proven method of strongly modularizing applications and has the added benefit of being inherently concurrent. Languages have been moving away from the shell for decades and have in the process lost its advantages. (With all that said in point 6, there is still room for something like a lightweight, cross-platform, glue-language similar to bash/ksh that -- like Go -- does not throw out 40+ years of shell history. Unsung Tcl/Tk (http://www.softpanorama.org/Scripting/tcl.shtml http://www.softpanorama.org/Scripting/tcl.shtml) and Expect seems to fit the bill the closest currently, though it does not read like the C family of languages. Perhaps if someone were to build a Go shell, or create a cshell that used used Go's conventions, Go would have a good glue-language counterpart.)
- TOGoS 14y agoNo. Not for me, anyway. Go seems okay. I tried to write a few small programs in it but spent a lot of time hunting around in the manual for how to do things. D (as in dlang.org) has a very similar feature set (static but not annoying typing, lightweight threads, value types, GC, native high-level arrays, yaddah yaddah) but is more familiar to us C/Java programmers. One feeling I get is that Go exposes a lot of quirks (e.g. the 'make' function and inter-thread messaging) in the syntax of the language, whereas D takes care of those cases with regular library functions. I was impressed that while writing my first D program I rarely committed any syntax errors, as I found it an intuitive extension of Java/C syntax. So if anything is to by my next go-to language, it's more likely to be D than Go. Or does that make it a d-to language? Ha ha ha heh hrm cough.
- jrb1 14y agoWhy would you write critical software on a language developed by one company that has a habit of dropping projects once they get bored with them? As the consternation of C# developers about windows 8, and java developers about Oracle lawsuits, relying on a language that a single company makes is foolish - especially companies that have a track record of abandoning projects. I think C++11 will be the new go to language. It is standardized. As Moore's law runs out for single cores, C++ is positioned as the language that can run fast on a single process and scale easily to multicore
- Evbn 14y agoNo, it is less expressive than Ruby and JS and so will not be as popular with the masses who optimize for LoC.
- wamatt 14y ago“How big a deal is this static typing thing??” - Barb Darrow (author of the article) wow