[bind10-dev] Enums as array indices and manual vs. auto-numbering

Stephen Morris stephen at isc.org
Tue Sep 6 12:43:07 UTC 2011


On 25/08/2011 20:47, Shane Kerr wrote:
> We happen to have one example of enumerations in the "Naming"
> section, which looks like this:
> 
> enum EnumName { THING_ONE = 1, THING_TWO = 2 } enum_instance;
> 
> So maybe that was interpreted to mean that we always use manually 
> assigned values.

When I looked at the coding guidelines, that was how I interpreted
them - otherwise why give an illustration that includes the manually
assigned numbers?

> 
> Like Jinmei, I also have no strong preference, but I tend to lean 
> towards preferring allowing the default values. If we need
> manually assigned values we should use them, but otherwise not.

In this case, the guidelines should be updated to omit the values.

Stephen



More information about the bind10-dev mailing list