News for hackers. Stuff that matters.
Re:Go After 2 Years in Production by dancric on Tuesday August 27, 2013 @12:41PM (#6284535)
As a developer on the Python stack, I would love to know when would be a good time to start using Go in serious production work. It seems to me that it solves a lot of the backend services infrastructure problems associated with interpretive languages (one of the reasons I was considering diving in Scala or other JVM languages), is relatively reliable, and has a fairly strong core library. It still seems bleeding edge, but the language seems to have developed far faster than Python did over the last decade or so.
Re:Go After 2 Years in Production by bhauer on Tuesday August 27, 2013 @12:56PM (#6284618)
The analogy is a little flimsy, but I'll run with it anyway: I consider Go today to be similar in some ways to Java at around the time of Java 1.1 or 1.2.

Obviously, Go is modern and is in many ways better than today's Java 1.7. But I am trying to illustrate its maturity level and the trajectory that I believe it's on. If you recall the days of Java 1.1, it was already seeing a great deal of early traction. The early traction of Go seems roughly the same to me. Also Java in its 1.1/1.2 years was on a clear trajectory to become a dominant language. I think Go will only grow in popularity for years to come in the same fashion. Even as a primarily Java developer, I look forward to Go being a clear and viable alternative.

I could be wrong about the trajectory, of course.

But I believe a short answer to your question is: if you're considering it, take some time to actually do something with Go. At first something experimental, then something for production use.

As a long-time JVM user, I've been trying to explain to other developers for a while now that assuming you use a modern approach to Java development, the performance of the JVM allows you to be (in my opinion) even more efficient than a dynamic language because you can code your application fairly recklessly. You can defer optimization in all of its forms for a long time, perhaps infinitely. The resulting mindset is a dramatically reduced concern about performance. When I work with most dynamic languages, I can never fully set aside the inner voice saying, "this is going to perform like crap." Trouble is, the voice is often right.

Go brings the same ballpark of performance as the JVM and a style that I believe is more appealing to Python developers than a modern Java stack (although I don't think modern Java stacks are given much of a fair shake because of Java's legacy, but that's a separate rant entirely).

Re:Go After 2 Years in Production by Pxtl on Tuesday August 27, 2013 @12:58PM (#6284628)
And like Java 1.2, it is still missing some critical deal-breaker features for a lot of people.
Re:Go After 2 Years in Production by bhauer on Tuesday August 27, 2013 @01:00PM (#6284643)
Exactly. The maturity level is about the same--obviously in different ways--but I think you get what I mean.

Will they ever add generics? Not sure. Will Java ever have proper first-class functions? Not sure.

Re:Go After 2 Years in Production by Ziomislaw on Tuesday August 27, 2013 @02:28PM (#6285229)
why generics? Have you really understood how to write Go? Generics are not needed, you have interfaces.
Re:Go After 2 Years in Production by bhauer on Tuesday August 27, 2013 @02:41PM (#6285309)
To be clear: I don't write Go professionally and I am not part of the "Generics or bust!" advocates. I'm agnostic.

I simply used it as an example of something that many would point to as evidence of Go's maturity level. If the language maintainers don't ever add generics to Go, I think I'd be comfortable with that. And if that's the way it plays out, eventually the design decision will be seen as firm and not a sign of immaturity.

Re:Go After 2 Years in Production by danieldk on Tuesday August 27, 2013 @03:53PM (#6285833)
Well, then write for me a type-agnostic map function that does not rely on introspection.
Re:Go After 2 Years in Production by mseepgood on Tuesday August 27, 2013 @04:29PM (#6286070)
If you understood how to write Go, you would write an imperative ad-hoc loop instead of composing generic functional combinators. But you have to be mature enough to jump over the shadow of your functional pride and write clean imperative code.
Re:Go After 2 Years in Production by danieldk on Wednesday August 28, 2013 @05:46AM (#6288841)
Of course you can write a 'for' loop. You can also write a goto in C. I was replying to my parent who said 'you don't need generics, since Go has interfaces'. I wanted to point out that interfaces are not a general substitute for generics.

But you have to be mature enough to jump over the shadow of your functional pride and write clean imperative code.

By that reasoning we can go back to assembly ;): you just have to be mature enough to jump over the shadow of your portability pride and write clean assembly code.

Abstractions exist to help us and in that respect Go feels like a throwback to the past. It's pretty much a Java 1.0 that compiles to machine code.

Re:Go After 2 Years in Production by jacques_chester on Tuesday August 27, 2013 @08:06PM (#6287187)
Loops impose order. Maps do not.

Maps are in principle trivial to parallelise. That would be a nice feature.

Re:Go After 2 Years in Production by sixbrx on Wednesday August 28, 2013 @01:22PM (#6291345)
Agree, and a map also provides an "at a glance" assurance that I'm getting a transformed array of the same size. For loops take longer to discern what they're doing just because they could be doing almost anything, including early exit.
Re:Go After 2 Years in Production by waterside81 on Tuesday August 27, 2013 @01:22PM (#6284791)
This might help you:

http://blog.repustate.com/migrating-code-from-python-to-gola...

I love using Go and I'm a Python guy through & through.

Re:Go After 2 Years in Production by kintamanimatt on Tuesday August 27, 2013 @12:55PM (#6284607)
> I would love to know when would be a good time to start using Go in serious production work

Now would be a good time. No language, runtime, compiler, library, or framework is ever going to be perfect, but now is a great time to dive in.

> It still seems bleeding edge

This is probably a good thing in many respects because Go doesn't have the baggage from yore, and it was created by some pretty smart and capable people.

> but the language seems to have developed far faster than Python did over the last decade or so

Language designers are getting better at marketing. No language succeeds without fantastic marketing.

Re:Go After 2 Years in Production by danieldk on Tuesday August 27, 2013 @03:56PM (#6285853)
This is probably a good thing in many respects because Go doesn't have the baggage from yore, and it was created by some pretty smart and capable people.

As was Javascript plus Node.js two years ago, Ruby and RoR five years ago, etc.

You'd think that more reasons are required than 'it is new, doesn't have baggage in was created by smart people'.

Re:Go After 2 Years in Production by kintamanimatt on Tuesday August 27, 2013 @04:07PM (#6285927)
Go isn't a framework. NodeJS is a framework, as is Rails. JavaScript and Ruby are very old languages, both laden with baggage.
Re:Go After 2 Years in Production by ricardobeat on Tuesday August 27, 2013 @10:24PM (#6287658)
node.js is not a framework, it's a platform written in c++ and js.
Re:Go After 2 Years in Production by kintamanimatt on Tuesday August 27, 2013 @11:24PM (#6287865)
Yeah, you're right. Thanks for pointing that out.
Re:Go After 2 Years in Production by gnur on Tuesday August 27, 2013 @03:12PM (#6285491)
Exactly, there is never a better moment to start learning something new then now.
Re:Go After 2 Years in Production by nknighthb on Tuesday August 27, 2013 @02:20PM (#6285171)
I'm using Go in production, and migrating existing Python services to it. I've found nothing wrong with using it for "serious production work". The ecosystem obviously isn't as mature, but it's getting there. There don't seem to be any gaping holes.
Re:Go After 2 Years in Production by eblume on Tuesday August 27, 2013 @12:45PM (#6284553)
Only one way to know that: give it a try!
Re:Go After 2 Years in Production by dancric on Tuesday August 27, 2013 @01:22PM (#6284793)
Good point!