Skip to content

proposal: Go2: introduce check keyword for errors on LHS of assignment #46655

Closed
@smasher164

Description

@smasher164

Edit:

  1. I have relaxed the requirement on excluding underscores in named return values. We can simply return the zero value of that type when there's an underscore.
  2. Referenced other similar issues.
  3. Added playground links for the "After" examples.
  4. Explain why named return values are necessary.
  5. Mention that check being a context-dependent keyword is different from the way identifiers work today, and could potentially be confusing to work with.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions