| I came from Python, so here are my two cents: The Good: - Go is a simple language. Going back to Python, I sometimes wish the language was a bit less batteries-included. (Incidentally, I've started to enjoy Lua a lot) - Go's compiler is fast. It's slowed down a bit starting with 1.5 as they rewrote the core compiler in Go, but apparently 1.7 will reclaim much of that speed. In 1.5, I could compile and run with `go run mything` faster than it would take to spin up ipython. - I've come to appreciate interfaces much more than classical OOP. - The ecosystem is great. The Bad: - I hate GoDoc. I tried to like it, but it's essentially a list of function signatures with a near complete absence of examples or clear instructions. The documentation culture in Python is much better, IMHO. - Channels are kinda slow. They're fast enough for almost anything network-related, but you should still use them conservatively. The Different: - Error handling in Go is the complete antithesis of error handling in Python - `panic` is not `raise`. Donc use panic/recover for flow control. - Blocking calls are perfectly okay. A few suggestions: - WRT interfaces, it's generally good to accept interfaces as function arguments wherever practical. Conversely, it's generally good to return concrete types from function calls, wherever practical. (See: https://youtu.be/29LLRKIL_TI) - Go excels at networking. Use Go instead of Twisted/asyncio and I think you'll be convinced. |
> I hate GoDoc. I tried to like it, but it's essentially a list of function signatures with a near complete absence of examples or clear instructions. The documentation culture in Python is much better, IMHO.
Just to give the opposite opinion, the nice part of godoc.org is that you get all the information in a consistent format in one place, and you can write documentation without needing to know Sphinx in all its complexity. Also, godoc.org is automatic--you don't need to publish anything yourself. I'm especially frustrated by documentation in Python because half the time all of the documentation for a given library is dumped onto one massive page, making it difficult to know if I'm looking at sqlalchemy.sql.select() or sqlalchemy.expression.Select.select() or sqlalchemy.sql.schema.Column.select() or etc. ReadTheDocs is great for libraries that use it, but there are too many that don't.
> Channels are kinda slow
They're still very fast for someone coming from Python.