> There have been research variations of Java that accomplished this: instanceof checks insert implicit casts on branches where the instanceof check is true.
By the way, Go already has this. If you have a variable, say `foo`, with a generic type, say `interface{}`, you can say
switch foo := foo.(type) {
case MyFirstConcreteType:
//foo is a MyFirstConcreteType instance here
case MySecondConcreteType:
//foo is a MySecondConcreteType instance here
default:
//foo is still the generic type here
}
By the way, Go already has this. If you have a variable, say `foo`, with a generic type, say `interface{}`, you can say
See https://golang.org/doc/effective_go.html#type_switch for details.