Live data from Hacker News

Why we switched from Python to Go

getstream.io

131–140 of 406 posts

Re: Why we switched from Python to Go

#131
post #94

Earlier quoted context omitted.

Probably complaining from someone used to exceptions and/or assertions, where there is perhaps less boilerplate and manual verification that context bubbles to the right place. You can get there either way, but what you're used to weighs heavily. For your example, depending on my experience, knowing that 1!=2 in some code I'm using directly might be more meaningful or actionable than "out of filehandles for accept()"…

Or anyone who's used a language where errors aren't as stringly-typed as Go and where the compiler can enforce error handling. Exceptions have benefits and drawbacks, but any language that can return a Result type will have better error handling than Go in basically every way.

In Go, `error` is an interface, which means you can return anything that implements the `Error() string` method as an `error`.

Re: Why we switched from Python to Go

#132

How do these shallow articles get upvoted so much ? they don't have much specific information except very generic "developer productivity". Let me give a specific example where moving to Go really helped our tooling: Go has some great interfaces, specifically their net & ssh client. In order to perform operations against some machines, we have to tunnel through bastions, however we'd also like the tool to work when a…

Because it's interesting to read others stories and thoughts.

I don't use Go nor Python but still thought the article was interesting.

> they don't have much specific information except very generic "developer productivity"

They give you a lot of reasons but in reality choosing a language is seldom about arriving at a scientific conclusion and much more about what feels best. Just like choosing a dish at a restaurant.

Re: Why we switched from Python to Go

#133
post #37

Earlier quoted context omitted.

Solved as long as there aren't native dependencies not managed by pip, which there often are.

Wheels solved this problem in 2013. For context, you can install opencv, tensorflow, ROS, matplotlib, and the entire scipy stack in a virtualenv, with no external dependencies, using wheels. This means that you can generate images, train a machine learning algorithm on them, compare the results to conventional CV algorithms, and display them in an ipython notebook all from a venv. There's a huge amount of C++ and eve…

Could you elaborate on how ROS fits into this framework?

Re: Why we switched from Python to Go

#134

Why does anyone write web apps in Python? PHP? Ruby? Modern Java and Go are so much faster than the alternatives that it's stupid to consider anything else if performance is important. Golang and Java can manage over a half million HTTP responses a second. Node is pretty fast but why bother when Java is many times more mature in features, tooling, and and supports concurrency... And uses less ram and is usually faste…

Most of the time, runtime speed is far, far less important than developer speed.

Re: Why we switched from Python to Go

#135

How do these shallow articles get upvoted so much ? they don't have much specific information except very generic "developer productivity". Let me give a specific example where moving to Go really helped our tooling: Go has some great interfaces, specifically their net & ssh client. In order to perform operations against some machines, we have to tunnel through bastions, however we'd also like the tool to work when a…

Actually moving to Go was a very thorough and long process. We did small example projects and tried out many of the libraries we needed. The blogpost is more of a high level summary of why Go is such a great language.

Oh hey, it's you. I weirdly recognize your name from many many years ago. I have vague memories of dealing with you in submitting an open source patch for Django Facebook. Or maybe it was just a documentation change. Either way I remember you being very polite and professional. Just wanted to say that stuck with me and please keep it up, as I can see you're doing here!

Re: Why we switched from Python to Go

#136
Right now, Docker, K8s and their adoption among Microsoft, Oracle, IBM are what keeps me keeping up with what goes on Go, because "hey we need to write some stuff in Go here".

For me Reason 3 is exactly the opposite, if I have to spend time manually writing code that other languages give me for free, I am anything but productive.

Re: Why we switched from Python to Go

#137
post #82

Why does anyone write web apps in Python? PHP? Ruby? Modern Java and Go are so much faster than the alternatives that it's stupid to consider anything else if performance is important. Golang and Java can manage over a half million HTTP responses a second. Node is pretty fast but why bother when Java is many times more mature in features, tooling, and and supports concurrency... And uses less ram and is usually faste…

> All the big companies are using Java and Go almost exclusively for high volume endpoints Please cite “all the big companies.” Also exclusively? No seriously, that is a bold claim. Google isn’t one of them because most of those hotepots are still written in C++. I don’t know how you can claim this. Based on some occaion company blog posts, changing just one or two endpoints out of say 100? What about Rust? I also kn…

Pick the Fortune 500 list, take out the SV darlings, the majority of their backend stacks will be a mix of Java and .NET deployments.

Easy to find out just by looking at their open job positions.

Re: Why we switched from Python to Go

#138
post #65
post #48

Earlier quoted context omitted.

> this is solved with virtualenv Except when you run into edge cases, which happens all the time.

elaborate?

I've occasionally had things spontaneously break. Most recently the cryptography package just stopped installing on deployment. Had to add a pip upgrade on deploy, which somehow prevented the AMI I was using from installing some of its requirements. Had to add those packages to my project requirements.

Also some of the data analysis packages don't work with virtualenv.

Re: Why we switched from Python to Go

#139

Python was my entry into the programming world, and I've been an evangelist ever since... Or I was until I ran into distribution and parallelism. Since then, Nim has been my go-to language of choice. It is all that Python was, plus unbelievable speed, compiling to shippable binaries, and some other cool language features that admittedly, are still beyond my scope of abilities. Still quite lacking in libraries compare…

For me, the ecosystem matters as much as the language itself these days (actually more). There are languages that I've used at home just as a learning experience, but ideally, I want a language that I can put into production at work. That means quite a list of criteria: only a small number of languages have a well-supported AWS SDK, for example.

I won't say that Go is mainstream yet, but it feels very "production-ready" in those respects.

Re: Why we switched from Python to Go

#140
post #6

Re: frameworks My experience with the language (building multiple production systems) is that the language itself is sort of it's own framework. You don't need to add much to build an application with the standard library. Which is a huge plus and makes things simpler.

That applies to all languages with exception of C, because they didn't want to standardize it as part of the language, hence we got ANSI C + POSIX instead.
Post reply on HN