# \[Pitch #2\] Property Delegates by Custom Attributes

**URL:** <https://forums.swift.org/t/pitch-2-property-delegates-by-custom-attributes/22855>\
**Category:** Pitches\
**Created:** [April 9, 2019, 8:45am UTC](https://forums.swift.org/t/pitch-2-property-delegates-by-custom-attributes/22855 "2019-04-09T08:45:05Z")\
**Posts on this page:** 1\
**Showing post:** 4

<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:** [April 9, 2019, 9:30am UTC](https://forums.swift.org/t/pitch-2-property-delegates-by-custom-attributes/22855/4 "2019-04-09T09:30:29Z")

</div>

Just to clarify a few things:

- The restriction for a property delegate type to have a single generic type parameter is now lifted? (Edit: I checked the tests in the new implementation and can confirm this restriction is gone. 🎉)

- Now that property delegates are custom attributes, do you have a vision what can/should happen next with the `IB` prefixed attributes? Those are part of the language if I'm not mistaken but they should really be part of `UIKit/AppKit`. One thing that concerns me a little is that `@IBOutlet` requires the type to be an optional. As a property delegate it could be similar to `DelayedMutable`.

- Can you also clarify in the proposal how the API surface marked with property delegates will look for imported API?

- One other thought: I hope the tooling can teached to jump to the property delegate type declaration when for example in Xcode you would cmd + click on the property delegate.

* * *

Small correction, `BehaviorRelay` is part of `RxCocoa` which is build as a common extension of `RxSwift`. That makes `BehaviorRelay` a safe wrapper around `BehaviorSubject` that has similar semantics except that it also can be disposed or error out. You can change `RxSwift's BehaviorRelay replays` to `RxCocoa's BehaviorRelay replays`. ;)

* * *

Other than that I love the direction the proposal is going now, it shaped into something really swifty.

---

_[View the full topic](https://forums.swift.org/t/pitch-2-property-delegates-by-custom-attributes/22855)._
