- Type system needs to be improved e.g. generic code
- Verbosity, duplication of code are painful
- Lack of functional features
- Tooling
- Maturity
- Type system needs to be improved e.g. generic code
- Verbosity, duplication of code are painful
- Lack of functional features
- Tooling
- Maturity
I haven't had an issue with code duplication at all. If you do, you might just not have gotten deep enough into how interfaces work yet.
When you use the standard library it's clear it was designed by people who have been programming computers since the Plan 9 days, I consider it much more mature than Python's equivalents.
In terms of tooling, having go fmt run on every save is wonderful, your code is always and instantly formatted perfectly. Beyond that, I haven't needed much.
For me, the biggest pain point is, to be honest, dealing with json. json in Go is not as fast as you would expect, due to the overhead of runtime reflection. Parsing "loose/dirty" json is also painful. If you cant be sure ahead of time if a value is `"1"` or `1` (int or string of int), and have to support both, you are going to have a bad time.
> If you cant be sure ahead of time if a value is `"1"` or
> `1` (int or string of int)
...then your data provider is _broken_ and you need to take it up with them :)Sometimes you actually have to deal with what you get, and can't just "fix the other end".
I personally struggled with the json parsing issue a fair bit, but persevering resulted in me having a mostly static typed setup which has ended up being much better than when I've used JS or Python.
Why? Go types (without generics) are much stronger than in Python aren't they?
In python, every function is as generic as it can be.
Map func(interface{}, func(interface{}) interface{}) []interface{}
Map([]string{"a", "b", "c", "d"}, ToUpper)The situation where you drop the types is the equivalent to Python isn't it?
Saying "we don't need map, we have for", is akin to saying "we don't need toUpper, we have for loops" or "we don't need functions, we have goto".
For me, that means every time I attempt to write code in Go my nose is rubbed in the "this language was built by assholes who have no respect for you".
I guess it does take some of the aesthetic or artistic quality out of it, but in practice it's never bothered me. On the contrary, not having the option removes quite a bit of mental overhead on what (to me) comes down to a fairly religious but ultimately inconsequential viewpoint.