I'll take an array over a giant switch-case statement any day.
- The array definition will be more compact and easier to see all at once.
- Defining actions in an array enforces uniformity.
- You can put checks in the code to automatically verify that the array definition is complete. (I ...