Skip to content

Does enum unspecified value best practice apply to proto3? #259

@maronnjapan

Description

@maronnjapan

Background

The Protocol Buffers best practices guide recommends including an unspecified value in enums:

Do Include an Unspecified Value in an Enum
Enums should include a default FOO_UNSPECIFIED value as the first value in the declaration.

However, the explanation primarily references proto2 behavior and examples.

Question

Does this best practice equally apply to proto3?

Context

  • The current documentation focuses on proto2-specific examples
  • The proto3 enum documentation mentions default behavior but doesn't explicitly reference this best practice

Expected Outcome

It would be helpful to clarify that this best practice applies to both proto2 and proto3, perhaps by adding a note that this recommendation is applicable to both protocol buffer versions.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      pFad - Phonifier reborn

      Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

      Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


      Alternative Proxies:

      Alternative Proxy

      pFad Proxy

      pFad v3 Proxy

      pFad v4 Proxy