How does this affect performance? Maybe sticking with switch statements and writing a linter of some sort to do exhaustiveness checks would be a better idea?