4 ms·
While vendoring is great, generics is bad addition to Go, since they complicated Go type system too much [1]. This makes typical Go code with generics hard to r
by valyala 2y ago
While vendoring is great, generics is bad addition to Go, since they complicated Go type system too much [1]. This makes typical Go code with generics hard to read and hard to maintain.
[1] https://go.dev/blog/type-inference https://go.dev/blog/type-inference
- conjurernix 2y agoLanguage was literally castrated without generics.
- valyala 2y agoLack of generics didn't prevent from creating many useful projects in Go such as Docker, Kubernetes, Prometheus, Terraform, etcd, minio, Caddy, Traefik, and many others from the list at https://github.com/search?q=language%3Ago+stars%3A%3E10000&type=repositories https://github.com/search?q=language%3Ago+stars%3A%3E10000&t... . I haven't heard of useful Go projects, which couldn't be written because of lack of generics before Go1.18, and which have been created after that. Also I'm unaware of useful projects, which benefitted from generics in any measurable way.