loading...

re: What is Golang? Why use the Go? Pros & Cons VIEW POST

TOP OF THREAD FULL DISCUSSION
re: I’d tend to agree here, though in my experience Golang libs tend to be a lot lower level primitives, as opposed to python which is very much batter...
 

No, that's the point, python is not batteries included. When python was created, nobody thought of all the types of problems we have to deal with today. The web wasn't even a thing back then. No one had a multi core machine. Python is missing a lot of what we need today, therefore you have to rely on third party libraries, no way around.

Go on the other hand was invented with exactly those modern problems in mind. It is truly batteries included, in that sense.

I can see the validity of you statement. I think it also pertains to the functionality you’re asking for and what you mean by batteries included. Python in a lot of ways has allowed for conflation of the standard lib by bloating the language with a lot of libraries and functionality. Just look at how bloated and unpythonic the unittest module is. It contains mocking and patching modules and shares a lot of similarities with junit. Go in direct contrast has a very simplistic testing module, requiring a lot of thought around design and testing. Even the way logging works in python, just import logging module and debug logs from the request module show up like magic. Go is certainly a lot more careful and explicit with primitives and what goes into the standard lib as part of its core philosophy. In agreement with you, Python wasn’t designed for the current problems or scale we face, as you pointed out, especially around concurrency as it doesn’t handle memory in a concurrent safe manner and relies on the GIL or process forking. I should clarify my meaning of batteries included, Python favors high level abstractions and hiding complexity (most times), Go forces you to think more about your own implementations, especially with design.

code of conduct - report abuse