Skip to content

Conversation

@sbillig
Copy link
Collaborator

@sbillig sbillig commented Jan 25, 2026

I declare that this feature is unnecessary. It adds mental and syntax overhead for little benefit. (I'm the one that decided we needed it in the first place, of course).

Arg labels are still required, unless preceded by an underscore.

// this is no longer allowed:
fn frob(knob x: u32) { // call site: "frob(knob: 10)", arg is called "x" internally
  if x == 0 { .. }
}

// arg labels are still required at the call site:
fn frob(knob: u32) { // call `frob(knob: 10)`
  // if you want to use the name `x` internally, just make an alias:
  let x = knob
}

// use underscore to not require arg labels
fn add(_ x: u32, _ y: u32) -> u32 { .. } // call `add(10, 20)`

@sbillig sbillig requested a review from cburgdorf January 25, 2026 08:31
Copy link
Collaborator

@cburgdorf cburgdorf left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fine by me

@sbillig sbillig merged commit 1d5e1a9 into argotorg:master Jan 25, 2026
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants