# Extending declaration names for closures

**URL:** <https://forums.swift.org/t/extending-declaration-names-for-closures/10376>\
**Category:** Pitches\
**Tags:** implementers-needed\
**Created:** [February 27, 2018, 8:41am UTC](https://forums.swift.org/t/extending-declaration-names-for-closures/10376 "2018-02-27T08:41:16Z")\
**Posts on this page:** 1\
**Showing post:** 1

<div class="post-metadata">

**Author:** ![DevAndArtist](https://sea2.discourse-cdn.com/swift/user_avatar/forums.swift.org/devandartist/32/287_2.png) [@DevAndArtist](https://forums.swift.org/u/DevAndArtist)\
**Post date:** [February 27, 2018, 8:41am UTC](https://forums.swift.org/t/extending-declaration-names-for-closures/10376/1 "2018-02-27T08:41:16Z")

</div>

[SE-0111](https://github.com/apple/swift-evolution/blob/master/proposals/0111-remove-arg-label-type-significance.md) was accepted with a small temporary regression of loosing parameter labels in closures. In an [extra commentary](https://lists.swift.org/pipermail/swift-evolution-announce/2016-July/000233.html) to this regression the core team pitched a solution that would be purely additive to the language without being a burden for the type system like pre SE-0111.

The solution has to come in two steps:

1. We have to extend the declaration names to allow labels in parentheses for variables, properties and parameters. (The following code snippet does not use `,` in between labels because in my honest opinion this is unnecessary and even inconsistent to how we already reference to functions `foo(first:second)` today.)

2. We extend the rules for function types to allow API labels to simplify the syntax from above. (This step would be pure sugar over the first step and won't replace it.)

I personally think while the second step would be nice, it is complementary to the core functionality introduced by the first step. Thus we should keep our focus on the main functionality.

However, I'm very open minded in that regard. That said, if someone can tackle the implementation of both steps for Swift 5 that would be great.

---

_[View the full topic](https://forums.swift.org/t/extending-declaration-names-for-closures/10376)._
