> Most other languages I know of only have a single type for a variable (and if you want to pattern match you must give each case a new variable name).
FWIW, Go also changes the variable's type in type-switch cases: https://tour.golang.org/methods/16