> It however does pass the type checking to run-time instead of compile-time
That's absolutely still loosing type safety. Reflections don't substitute type safety.
That's absolutely still loosing type safety. Reflections don't substitute type safety.
I also wouldn't consider Go type assertions to be in the same class as reflection. A type assertion is the way you extract and check the underlying type from an interface, and is quite common even when using more complex interfaces. There's also no way to make use of the underlying type from an interface without first asserting it as that type.