It occurred to me that the way IANA types are represented in base::iana is not great. Currently we have an enum with an Int variant for undefined values. But because the field of that variant is public, you can actually create an Int variant for a well-defined value which is weird at best and causes issues at worst.
Instead, we should probably have a type that (privately) wraps the underlying integer type and define associated constants for all the known variants.
Obviously, this is a massively breaking change but I think it is worth doing as it will make the code more robust. So, I’d like to do it with 0.10.0 already.
It occurred to me that the way IANA types are represented in
base::iana
is not great. Currently we have an enum with anInt
variant for undefined values. But because the field of that variant is public, you can actually create anInt
variant for a well-defined value which is weird at best and causes issues at worst.Instead, we should probably have a type that (privately) wraps the underlying integer type and define associated constants for all the known variants.
Obviously, this is a massively breaking change but I think it is worth doing as it will make the code more robust. So, I’d like to do it with 0.10.0 already.