|
It's been a while since I last touched go. But I remember having a bunch of fun with it when coding up some mathematical challenge problems. Off hand here's what I remember: Any two integers can be calculated in python without issue. In C/C++ and golang, you have to check for overflow somehow. So when python decodes a json, any large integer get parsed correctly and put into memory. With golang and C/C++, those are extra corner cases. panic() seems to be half-hearted. Kind of like C++'s attempt to use exceptions. Not completely unhelpful, but not a big productivity win. But in either language, the stack has to unwind -- so it feels like they could have used exceptions, and golang errors can be a class with it's own type... Index out of bounds in arrays panic, in python it's just an IndexError. Channels block, and trying to work around that is weirdish. It's akin to unix file descriptors, but I can ask unix if the file descriptor would block before I use it. What's wrong with: ok, err = ch.send("message", timeout=5)
Non-blocking would just be: ok, err = ch.send("message", timeout=0)
I decided not to move to go, in the end. While yes, go would be faster, many of the things I'd use on a day to day basis wouldn't change. Databases, network speed, file/disk access, etc. |