I don't mind paying the static + compile approach, but in that case, pretty please allow me to instantiate instances of types using simple string name of the type!
If go allowed that kind of "eval"-like functionality, it would be impossible to compile it down to a static binary. You would always be wondering if someone would instantiate a type that you didn't include in the binary.
Java's VM does allow creating classes from strings. It has its uses, I guess, but Go is more based around the idea of knowing the types ahead of time.
Unless you are just talking about syntax, in which case you should know that new is completely optional in most scenarios; new Foo is the same as &Foo{0}, etc.
If go allowed that kind of "eval"-like functionality, it would be impossible to compile it down to a static binary. You would always be wondering if someone would instantiate a type that you didn't include in the binary.
Java's VM does allow creating classes from strings. It has its uses, I guess, but Go is more based around the idea of knowing the types ahead of time.
Unless you are just talking about syntax, in which case you should know that new is completely optional in most scenarios; new Foo is the same as &Foo{0}, etc.