by pjmlp · 4y ago · 0 comments
They don't have to be "perfectly" designed, the design needs to exist. If Go didn't have a design, it would've had a half assed generics implementation, like C++ has multiple inheritance. It's precisely because generics are hard to implement right and the design constrains how much you can stretch the language that Go still doesn't have them. And it's arguably a good thing.
Sorry I wasn't explicit: it's safer and easier to write the same application in Go or Zig than it is in C++, even without generics or read-after-write compile-time checks.
Go generics are half assed, compromised to fit into existing codebases, as it was expected they would turn out.
Are you also going to argue for the beautiful design of nullable interfaces that aren't actually null?
Maybe it was the clever design idea that one has to produce a compiler error to validate if a given type does support or not a specific interface.
I know, modules, what a beautiful design, where the community feedback was greatly appreciated, what a lovely design it turned out to be.