Live data from Hacker News

Why We Switched from Python to Go (2021)

softwareengineeringdaily.com

91–100 of 301 posts

Re: Why We Switched from Python to Go (2021)

#91

I read somewhere on HackerNews that Python is kinda like a default language and rest such as Go, C, C++, Java are just for Optimization, once you figure out your solution.

There's an element of truth to that in some cases, but it's mostly just something Python fans say to excuse the fact that Python is so slow.

It's not true for two reasons:

1. In practice writing a prototype in one language, then completely scrapping it and rewriting it in another language almost never happens for fairly obvious reasons.

2. The "slow bits" of a Python program are rarely neatly concentrated in a few parts of the program that you can rewrite in a fast language. The whole program is slow, so there's no small part that you can rewrite to make it all faster.

3. There are other languages that are just as easy to use as Python (easier even!) but are also fast enough that you don't need to rewrite anything in most cases. Typescript is probably the best option at the moment but there's also Dart, Lua and probably others I've forgotten.

Python is popular because it's seen as very beginner friendly so there's a mountain of content out there teaching people Python. Also the REPL makes it good for beginners and for science.

Re: Why We Switched from Python to Go (2021)

#92
post #52

I think Go and Angular should have died, and would already be footnotes in programming history if they had not been introduced by Google. Let's make procedural programming great again? I get it, you can compile it and it has concurrency, but there's better alternatives in my mind, unfortunately not as popular.

Go is incredibly productive. Its primitive type system keeps me from bikeshedding, the standard library mostly makes sense, builds are fast, and yes, the builtin asynchronous IO means that I can write a C10K server without even trying. No JVM, no choosing between libuv and libevent, literally just take the simplicity of the fork-per-request model and adapt it to modernity.

Re: Why We Switched from Python to Go (2021)

#93
post #14

>[Go] is almost as fast as languages like C++ and Java. It seems like only a couple of years ago when Java's speed was the butt of many a joke. The JVM has come a long way. As someone who doesn't work in Java and doesn't have a horse in this race, I find their turnaround impressive.

I dunno I feel like the language was always seen as fast..ish. It was the startup time, memory use, and speed of actual applications that were slow.

Is Eclipse fast yet?

Re: Why We Switched from Python to Go (2021)

#94
post #52

I think Go and Angular should have died, and would already be footnotes in programming history if they had not been introduced by Google. Let's make procedural programming great again? I get it, you can compile it and it has concurrency, but there's better alternatives in my mind, unfortunately not as popular.

What's wrong with Angular? It being largely "batteries included" seemed pretty nice and I really liked the fact that TypeScript was a first class citizen - React and Vue both feel like it's been kind of tacked on, especially when a lot of additional libraries out there don't really have proper bindings.

That said, personally I also think that React kind of went downhill for a bit due to the hooks (after seeing a few projects become really nightmarish to debug due to render loops without clear causes for them, after people sprinkled one too many hooks in there).

Oh, and the Vue 2 to 3 migration is also a bit problematic because still many UI component libraries haven't been migrated over - currently actually using PrimeVue on a project because BootstrapVue still doesn't have proper support https://github.com/bootstrap-vue/bootstrap-vue/issues/5196

Re: Why We Switched from Python to Go (2021)

#95

So they switched to Go from Python, because of following advantages: #1 Performance #2 Performance (to make the list longer I guess?) #5 Fast compile time... which is an advantage over Python how exactly? #7 Strong ecosystem... which brings us to disadvantage #1 - lack of frameworks (?)

> #5 Fast compile time... which is an advantage over Python how exactly?

I think this would probably be more why they switched to Go, rather than why they switched away from Python.

Alternately, how fast are Python linters? It might be faster to compile Go than to run their linter (or whatever).

Re: Why We Switched from Python to Go (2021)

#96
post #65
post #44

Earlier quoted context omitted.

On first startup we used Tcl, and C code for performance, similar to what is fashionable with Python nowadays. I had enough of the rewrite in C experience that since then, if the language doesn't come with a compiler on the box, either JIT or AOT, I only see it as scripting language for sysadmin work or learning purposes.

AOLServer had a lot of defaults that would magnify the performance issues of TCL. The documentation did not cover all of the necessary configuration options to get a system to scale and you had to dig into driver.c to understand how to tune the system. I think the two big undocumented bottlenecks were maxsok and backlog. I bet if you were writing the same applications today, using modern hardware and Naviserver you w…

Our product was a competitor to AOLServer with CMS tooling for call centers.

Also Vignette, remember it?

When we dediced to move away from TCL/C, after exhausting the performance options, J2EE was going to be the next version.

Due to a twist of fate of being Microsoft partners, we got invited to take part into .NET launch product line, and that Java rewrite became a .NET one instead.

The original founders, after going through these experiences, went out and created OutSystems based on the learnings, naturally in .NET and later a Java backend was added as well.

Re: Why We Switched from Python to Go (2021)

#97
post #52

I think Go and Angular should have died, and would already be footnotes in programming history if they had not been introduced by Google. Let's make procedural programming great again? I get it, you can compile it and it has concurrency, but there's better alternatives in my mind, unfortunately not as popular.

Go is successful because it has many appealing features:

  1. trivial cross-compilation
  2. native multi-threading (eg no GIL or multi-process hacks) that is easy to take advantage of
  3. fast. An order of magnitude faster than Python in many cases.
  4. easy to deploy. Most often just a single binary
I like Go because once I compile it, I can ship that binary anywhere and it will run. I like Python for a great number of tasks and for prototyping, but I prefer Go when I need to run my code on another machine (or it needs to be fast).

To put it simply, with Go I ship a binary. With Python I have to ship my entire development environment.

Re: Why We Switched from Python to Go (2021)

#98

I always wondered why Stream was using Python instead of Go. Glad to hear they are able to make the change now. There is no comparison between Go and my Python or Node.js services when it comes to data processing or pipelines. > Revel, Iris, Echo, Macaron and Buffalo seem to be the leading contenders. If you're talking about MVC-era frameworks these are fine. However a lot of companies are using Go for microservices…

> Glad to hear they are able to make the change now

This was written 4 ½ years ago.

Re: Why We Switched from Python to Go (2021)

#99
post #2

Something is odd about the timing. This article is dated "Wednesday, March 3 2021" but appears to be identical to https://getstream.io/blog/switched-python-go/ dated Oct 17, 2017 and updated either May 14th 2019 or Sep 15, 2020. Both say "Early this year, we switched Stream’s primary programming language from Python to Go", and there was HN discussion about it on Oct 17, 2017 at https://news.ycombinator.com/item?id=1…

Someone cross posted my content from 2017. It's been 4+ years.

Re: Why We Switched from Python to Go (2021)

#100

Earlier quoted context omitted.

Python is a pretty terrible language to work with. Tooling sucks. Dependency conflicts are common. There's no test framework/runner worth a damn. Web frameworks are inferior to those in most other languages. If you're doing data science things, it's hard to beat pandas/numpy. I get that those are popular in that community because the barrier to entry with Python is low. People who are just looking for a tool to solve…

> Web frameworks are inferior to those in most other languages. That's quite a statement. Go on, for most of the other languages, show me a web framework that's better than Django. Python absolutely has deployment challenges, but the performance is Good Enough™ and the speed of modelling and maintaining and accessing databases in Django's ORM is so much better than anything else I've found. Its Admin interface too is…

I am a self admitted python- and ORM-hater and I agree. Django is pretty fantastic, and I have successfully used it to spin up several complete CRUD projects in a day or two
Post reply on HN