va-filter icon indicating copy to clipboard operation
va-filter copied to clipboard

Num enum

Open perlindgren opened this issue 2 years ago • 0 comments

Enum based implementation for handling parameters.

Advantages:

  • improved readability, the connection between parameter numbers and their purpose becomes clean.
  • improved robustness, less risk of introducing bugs,
    • stable parameter indexing, with possibility to grouping
    • parameter index uniqueness guaranteed at compile time
  • improved ergonomics, less code repetition, traits are derived that implements most of the "propagation"

Disadvantages:

  • a few dependencies introduced, (num-enum and strum), requires the user to understand how they are used for declaring parameters.

/Per

perlindgren avatar Mar 06 '22 10:03 perlindgren