4 ms·
> 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, G
by twotwotwo 7y ago
> 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 https://tour.golang.org/methods/16