Protobuf enums replicate some behaviors from C++ enums, leading to potential issues such as name collisions due to unscoped values. Buf lint rules like ENUM_VALUE_PREFIX and ENUM_ZERO_VALUE_SUFFIX help mitigate these problems. It’s recommended to use prefixes for enum values to avoid these pitfalls and to select a generic ‘unknown’ as the default zero value.
Sort: