Python
Python allows you to get pretty creative with the code you’re writing. For instance, you can:
Use MetaClasses to self-register classes upon code initialization
Swap out True and False
Add functions to the list of built-in functions
Overload operators via magic methods
Use functions as properties via the @property decorator
Case study from get stream
Go is fast! Go is extremely fast. The performance is similar to that of Java or C++. For our use case, Go is typically 40 times faster than Python.
Goroutines are Go’s lightweight approach to threading, and channels are the preferred way to communicate between goroutines.
Goroutines are very cheap to create and only take a few KBs of additional memory. Because Goroutines are so light, it is possible to have hundreds or even thousands of them running at the same time.
Go’s approach to concurrency is very easy to work with.
Another great aspect of concurrency in Go is the race detector. This makes it easy to figure out if there are any race conditions within your asynchronous code.
Go has great support for the tools we use. Solid libraries were already available for Redis, RabbitMQ, PostgreSQL, Template parsing, Task scheduling, Expression parsing and RocksDB.
Gofmt is very similar to Python’s autopep8.
Go has first-class support for protocol buffers and gRPC.
Python is a great language but its performance is pretty sluggish for use cases such as serialization/deserialization, ranking and aggregation. We frequently ran into performance issues where Cassandra would take 1ms to retrieve the data and Python would spend the next 10ms turning it into objects.
Reference
https://getstream.io/blog/switched-python-go/
https://howistart.org/posts/go/1/