# \[Pitch\] Function Back Deployment

**URL:** <https://forums.swift.org/t/pitch-function-back-deployment/55769>\
**Category:** Pitches\
**Created:** [March 7, 2022, 5:16pm UTC](https://forums.swift.org/t/pitch-function-back-deployment/55769 "2022-03-07T17:16:25Z")\
**Posts on this page:** 1\
**Showing post:** 49

<div class="post-metadata">

**Author:** ![tshortli](https://sea2.discourse-cdn.com/swift/user_avatar/forums.swift.org/tshortli/32/15850_2.png) [@tshortli](https://forums.swift.org/u/tshortli)\
**Post date:** [March 14, 2022, 8:11pm UTC](https://forums.swift.org/t/pitch-function-back-deployment/55769/49 "2022-03-14T20:11:16Z")

</div>

> [@Philippe\_Hausler](#):
>
> One potential interesting consideration is making a type (like a structure or class, or heck even protocols) be back deployable.

One thing which I haven't covered in the Future Directions section of the proposal yet but seems like it would be a logical next step would be back deployment of protocol conformances, e.g.

```swift
@available(toasterOS 1.0, *)
@backDeploy(toasterOS 2.0, *)
extension Toast: Hashable {
  // ...
}

```

There are plenty of backend details to work out about how this would be accomplished, but there are also some design questions we could ask now about how the proposed attribute would be extended to cover this case. Allowing the attribute to be applied to the extension declaration seems like the natural way to do this, but that raises some questions like whether you should be able to back deploy extensions in general. We'd also need to think about how to handle extension members with heterogenous availability or back deployment. The conservative approach would be to require annotations on every member for maximum clarity, but it would be verbose.

EDIT: I found a [thread](https://forums.swift.org/t/backwards-deployable-conformances/29876/) from a few years ago where @jrose discussed back deployment for protocol conformances.

> [@Daeke](#):
>
> Having done a lot of web development, I am more familiar with the terms `shim` and `polyfill` than `backDeploy` (in fact, this is the first time I ever heard of `back deployment` ).

I think "back deploy" is a fairly well established term of art in the Swift community (there are 35 hits when I search this forum for the phrase "back deploy"). This is the first time I've heard the term `polyfill` myself, but perhaps it feels more familiar to others (EDIT: I searched for it here on the forums as well and it also comes up plenty, though not as frequently; I guess this is just my ignorance!) As for `shim`, I think it could work when combined with "compatibility", but to me "back deploy" feels like a more precise description of what the attribute accomplishes.

---

_[View the full topic](https://forums.swift.org/t/pitch-function-back-deployment/55769)._
