Using a lookup-table to correct an approximation
I often find myself writing (by which I mean generating) functions to convert enums to strings. A naïve implementation of such a function might look like:
I often find myself writing (by which I mean generating) functions to convert enums to strings. A naïve implementation of such a function might look like: