# Include argument labels in identifiers

**URL:** <https://forums.swift.org/t/include-argument-labels-in-identifiers/35367>\
**Category:** Pitches\
**Tags:** declarations, functions, labels, identifiers\
**Created:** [April 14, 2020, 1:14pm UTC](https://forums.swift.org/t/include-argument-labels-in-identifiers/35367 "2020-04-14T13:14:05Z")\
**Posts on this page:** 1\
**Showing post:** 11

<div class="post-metadata">

**Author:** ![Karl](https://avatars.discourse-cdn.com/v4/letter/k/34f0e0/32.png) [@Karl](https://forums.swift.org/u/Karl)\
**Post date:** [April 16, 2020, 10:19pm UTC](https://forums.swift.org/t/include-argument-labels-in-identifiers/35367/11 "2020-04-16T22:19:56Z")

</div>

```swift
protocol FooProtocol {
  func doAThing(using: String)
}

struct ConformsUsingClosure: FooProtocol {
  var doAThing: (String)->Void = { print($0) }
}

let instance = ConformsUsingClosure()
instance.doAThing("where did my label go?")

let erasedInstance: FooProtocol = instance
erasedInstance.doAThing(using: "Okay, now we get a label?")

```

Since closures don't support argument labels, we'd have to drop the "using:" label when invoking the function in a concrete context. [I asked about adding support](https://forums.swift.org/t/pitch-allow-closures-default-params-to-satisfy-protocol-requirements/5530) for this before, and the consensus was that dropping the argument labels was not acceptable (so it's not a technical limitation - it's just something we don't want to support until we can preserve the labels).

If we could instead write this:

```swift
struct ConformsUsingClosure: FooProtocol {
  var doAThing: (using: String)->Void = { print($0) }
}

```

Then we get a nice, consistent calling syntax, and there shouldn't be any objection to allowing the closure to witness the function requirement.

---

_[View the full topic](https://forums.swift.org/t/include-argument-labels-in-identifiers/35367)._
