Original post

Constants in , when combined with iota, can be a nice way to use options and settings as a list. We have an example below using genders to show this in action. The problem comes if you want to encode/decode structs to JSON, then the constant will be encoded into an int – sometimes it would be nice to convert this to a string to make it easier to represent what it is.