# Protocol Witness Matching Roadmap

**URL:** <https://forums.swift.org/t/protocol-witness-matching-roadmap/60297>\
**Category:** Discussion\
**Tags:** protocol, roadmap, witness\
**Created:** [September 14, 2022, 9:00pm UTC](https://forums.swift.org/t/protocol-witness-matching-roadmap/60297 "2022-09-14T21:00:54Z")\
**Posts on this page:** 1\
**Showing post:** 7

<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:** [September 15, 2022, 11:47am UTC](https://forums.swift.org/t/protocol-witness-matching-roadmap/60297/7 "2022-09-15T11:47:05Z")

</div>

> [@suyashsrijan](#):
>
> ### Properties with function type
> 
> We could allow a function to match a property protocol requirement with a function type. For example:
> 
> ```swift
> protocol P {
> var bar: () -> Int
> }
> 
> struct S: P {
> func bar() -> Int { ... }
> }
> 
> ```
> 
> or vice versa - letting a function requirement be witnessed by a property with function type:
> 
> ```swift
> protocol P {
> func bar() -> Int
> }
> 
> struct S: P {
> var bar: () -> Int { ... }
> }
> 
> ```

I also second that this should be possible, especially after we finally resurrect and actually get '[compound names](https://forums.swift.org/t/compound-variable-names/37963)' in Swift.

---

_[View the full topic](https://forums.swift.org/t/protocol-witness-matching-roadmap/60297)._
