You could technically switch on tag since they’re Name
s:
But enums are neater, and you do not risk typos.
Another way is to use a tMap
association - Name | WhateverYouWant
. Finding in a map is fast, no iteration.
You could technically switch on tag since they’re Name
s:
But enums are neater, and you do not risk typos.
Another way is to use a tMap
association - Name | WhateverYouWant
. Finding in a map is fast, no iteration.