Skip to content

proposal: Go 2: Error-Handling Paradigm with !err Grammar Sugar #62253

Closed as not planned
@shynome

Description

@shynome

Hi, if you like this idea please give a heart emoji to me, Thank you very much

//  before, 4 line
f, err := os.Open()
if err != nil {
  return
}

// now, 1 line
f, !err := os.Open()

I plan to impl this by gone-lang, your like emoji can speed development

Metadata

Metadata

Assignees

No one assigned

    Labels

    FrozenDueToAgeLanguageChangeSuggested changes to the Go languageProposalerror-handlingLanguage & library change proposals that are about error handling.v2An incompatible library change

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions