Sure. Obviously – well, maybe not obviously, but the truth is the language that we’re most familiar with is C++, so we’ve spent a lot of time looking at the C++ implementation of generics, which of course is called templates in C++. We knew there were aspects of templates that were just gonna be hard to bring into a language like Go, and that we didn’t even want in a language like Go. In C++ you could actually view templates in C++ as another programming language, which I believe is actually Turing complete, that’s sort of layered over the ordinary C++ language, only it uses a completely different syntax, and it’s evaluated at compile time.

So that’s what people mean when they talk about template metaprogramming. You can actually write entire programs in the template language. They’re very difficult to understand… But that wasn’t the direction we wanted to go. We wanted to sort of hone away all that to just get to the core idea of just being able to use types.

We also, of course, looked at the C++ syntax, which many people are familiar with, using angle brackets, but we couldn’t figure out how to make that work in Go… Because Go has the ability that you can parse the syntax without knowing the types of the names; in order to fully resolve the program you have to know the types, but you can actually do all the parsing without knowing the types, and that’s not true in C++. When parsing C++, you need to know if something is a template or an ordinary variable, and we needed to preserve the ability to easily parse Go. It makes the compiling faster and it makes it much easier to write a lot of important tools, like Go Imports… Much easier for them to parse the code if they don’t need to understand the type of every name.

[ ] Anyhow, that’s kind of where we started from… And of course, we looked at a lot of other languages, too. D, Ada, CLU… CLU had a lot of these ideas back in the ‘70s. It’s too bad that language hasn’t carried forward. And of course, Java.