Value defined in DB コードの差分に数値の変更が表れないため意図しない数値の変更に 気付きにくい Difficult to notice unintended numerical changes because numerical changes are not represented in the code differences. Iotaを使わない方が良い場面 Situations where iota should not be used.
too complex a specification for the problem they want to solve. Go2に向けて今も議論されている Still being discussed for Go2. https://github.com/golang/go/issues/28987 Why not Enum?
iotaはconst宣言のindex値として扱われる iota is treated as an index value of const declaration • iota + 1でゼロ値による意図しない挙動を防げる `iota +1` to prevent unintended behavior due to zero values. • 1 << iotaで単一の値で複雑な状態も表現できる Complex states can be represented with a single value in `1 << iota` Summary