Golang vs Python in Five Minutes



  • Golang: compiled. One interesting feature is that compilation errors are returned when dead code (i.e. non-reachable) is present.
  • Python: interpreted. Errors surface late at runtime. This is one of the worst aspects of Python in my opinion because some fatal errors may only surface in production. I saw this happen way more often than I can remember. However, to be fair, there are some libraries that address this but didn’t use them extensively to comment on their usefulness.


  • Golang: a single binary is produced. This means that you can take your binary and run it anywhere and expect the same behavior.
  • Python: dependencies need to be downloaded. This makes the artifacts light in size but adds the overhead of ensuring dependencies are configured correctly.


  • Golang: built-in.
  • Python: add-on.

Memory Management:

  • Golang: built-in.
  • Python: add-on.


  • Golang: static.
  • Python: dynamic to the point that it is not that useful.

Third-Party Integrations:

  • Golang: integrations with popular cloud services are not widely available. Typically, you will need to write your own integrations.
  • Python: statistically speaking, almost every popular service in the cloud has a Python library.


  • Golang: first release was in 2009.
  • Python: first release was in 1991.


  • Golang: distributed systems.
  • Python: data intensive applications & data analysis. It is particularly good for prototyping especially when used in a notebook.

Programming Paradigm:

  • Golang: procedural. Mild support for functional programming (FP) and object-oriented programming (OOP) concepts. There is no concept of a `class` however.
  • Python: procedural with good support for FP and OOP concepts.


  • Golang: more verbose because it has fewer built-in functions. This is in fact the core philosophy of Go: simplicity with a few features and a few updates between versions. One good feature in Golang is its support for grouped imports which helps save some typing.
  • Python: it has a wealth of built-in functions and relies on indentation to define code blocks (i.e. no need for brackets and semicolons). This makes code significantly more concise.

Error Handling:

  • Golang: relies on return values. It has no support for exceptions.
  • Python: relies heavily on exceptions that propagate throughout the call stack.


  • Golang: relies on the programmer to build logic.
  • Python: relies on built-in and third-party libraries to build logic.




Energy & Computing @ Shell & GWU (Opinions my own)

Love podcasts or audiobooks? Learn on the go with our new app.

Recommended from Medium

Tap Fantasy X トレーダー西条 Exclusive Airdrop Winner List!!!

📐Tech Sketches Issue #1 — Dexter VP of Engineering David Hu

6 Types of Builders/Software Engineers in the World

Joomla “Not easy to pal up with” — Now let me retort!

Why We Built YugabyteDB by Reusing the PostgreSQL Query Layer

Enhance local development experience using the Azure Cosmos DB Linux emulator and VS Code

How to connect MongoDB to S3 to connect with S3 integration with QuickSight

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Alaeddine Mokri

Alaeddine Mokri

Energy & Computing @ Shell & GWU (Opinions my own)

More from Medium

Golang in sixty seconds — string formatting

Read a CSV file in Golang

Variables in Python and GO.

Why you should try out Golang