3 ms·
You have to be careful when doing this type of stuff. For instance, the switch case is actually doing both validation and switching, where as the dispatch tabl
by jcampbell1 13y ago
You have to be careful when doing this type of stuff. For instance, the switch case is actually doing both validation and switching, where as the dispatch table does no validation.
Consider:
processUserInput('toString');
That has very different behavior in the two different styles.