Live data from Hacker News

What Python developers need to know before migrating to Go

blog.repustate.com

1–10 of 117 posts

Re: What Python developers need to know before migrating to Go

#6

Any HN readers of this post have any similar experience? I know the bright team over at bit.ly made a successful switch from python to go-- anyone else? The more I hear about go, the more I like it.

I don't think they did an entire switch over.

"We identified early on that Go had all the makings of a language that could supersede some of the places we would have traditionally turned to C and some of the places where we wanted to move away from Python."

Re: What Python developers need to know before migrating to Go

#8
>> No built-in type for sets (have to use maps and test for existence)

Is there any particular reason for this? Sets are so fundamental to mathematics and beyond that I am concerned right away about this. Sure you could use a map as a replacement, but what happens to "user experience"?

I do not get this for other languages as well. Data structures that are present in nearly all computer science books are often not built into the language or standard libraries, like trees, graphs. Reasoning given is that some other data structure could serve as a replacement (never mind that the programmer's intentions are not directly reflected in the code anymore), or because it is considered too removed from practical usage, or because some third-party library includes it. I do not buy any of these arguments.

Re: What Python developers need to know before migrating to Go

#9
Many of the things he says he misses from Python, I would rather not have in production code. Heterogenous dictionaries are often objects that should have been, with no encapsulation and a high degree of implicitness that makes them hard to refactor later.

Re: What Python developers need to know before migrating to Go

#10

Any HN readers of this post have any similar experience? I know the bright team over at bit.ly made a successful switch from python to go-- anyone else? The more I hear about go, the more I like it.

I'm working on a personal project that uses Python for most of the page rendering and Go for the heavy lifting (receiving a large stream of data that I have to process quickly and efficiently).

The ecosystem has a long way to go (compared to Python), but goroutines and channels are a pleasure to work with. It's nice being statically typed again, and I really like object composition versus Python's inheritance. Resource usage for my cases is much lower, latency is much lower, throughput is much higher, and my deploy/provisioning scripts are a lot more simple due to Go's static compilation.

At my day job, we may start mixing in Go for background tasks that are a bit too slow/inefficient in our current Python stack. I could also see it being a good fit for some of our more high traffic HTTP APIs.

Post reply on HN