Go was designed for internal use at Google, and one of the primary goals was to reduce compilation time for huge codebases (the size of Google monorepo). For such amount of code even `javac` was too slow for them. To solve this problem, Go was designed to be compiled with 1-pass compiler (similar to Pascal and Modula-2) which makes features like generics and type inference very hard (if not impossible) to implement.
Interestingly, Delphi Pascal has a single pass compiler with generics, though I'm not sure about type inference.
I was under the impression Go originally avoided generics more for a perceived abstract complexity for developers, the idea being they are hard to understand for new recruits.
If that’s true it’s insane that they didn’t try to solve the code explosion problem. Perhaps even a Google-specific DSL that captures their common patterns behind an abstract syntax.
Creating a new general purpose language with such a limited feature set - that it’s likely to result in even more code - seems to be an odd solution.
Go was designed for internal use at Google, and one of the primary goals was to reduce compilation time for huge codebases (the size of Google monorepo). For such amount of code even `javac` was too slow for them. To solve this problem, Go was designed to be compiled with 1-pass compiler (similar to Pascal and Modula-2) which makes features like generics and type inference very hard (if not impossible) to implement.