3 ms·
I find using objects mapped as switchKeyToFunction to be more idiomatic and readable. e.g. shapeToDrawFn[shape] But to each their own
by adam_arthur 4y ago
I find using objects mapped as switchKeyToFunction to be more idiomatic and readable. e.g. shapeToDrawFn[shape] But to each their own
- phs2501 4y agoWill the compiler check that you have an exhaustive set of keys in your definition of `shapeToDrawFn`? (Not a rhetorical question, I don't know.)