# Constrain protocol usage outside the module

**URL:** <https://forums.swift.org/t/constrain-protocol-usage-outside-the-module/8832>\
**Category:** Pitches\
**Created:** [January 25, 2018, 9:03am UTC](https://forums.swift.org/t/constrain-protocol-usage-outside-the-module/8832 "2018-01-25T09:03:18Z")\
**Posts on this page:** 1\
**Page:** 6

<div class="post-metadata">

**Author:** ![anandabits](https://sea2.discourse-cdn.com/swift/user_avatar/forums.swift.org/anandabits/32/355_2.png) [@anandabits](https://forums.swift.org/u/anandabits)\
**Post date:** [August 9, 2018, 1:37am UTC](https://forums.swift.org/t/constrain-protocol-usage-outside-the-module/8832/101 "2018-08-09T01:37:18Z")

</div>

I agree that closed protocols would be useful in a number of contexts and would love to see them added.

Depending on your level of comfort with workarounds and boilerplate (that's easy to generate) there is a hack you can use right now! [Emulating closed protocols in Swift · GitHub](https://gist.github.com/anandabits/bd73521e0c5c06371f4a268ab8c482c9)

That's obviously not a substitute for real language support, but it's worth knowing about in the meantime.

[Previous page](https://forums.swift.org/t/constrain-protocol-usage-outside-the-module/8832.md?page=5)
