On Thu, Feb 22, 2024, 23:46 Jeff Davis <pg...@j-davis.com> wrote:

>
> Am I missing something?


The main benefits it has are:
1. The order of the array doesn't have to exactly match the order of the
enum for the arrays to contain the correct mapping.
2. Typos in the enum variant names are caught by the compiler because
actual symbols are used, not comments.
3. The left-to-right order reads more natural imho for such key-value
pairs, e.g. OCLASS_PROC maps to ProcedureRelationId.

Reply via email to