Proposal: Allow @available(*, unavailble) to getter or setter.

Sometimes people want to prevent accessing getter/setter method individually. I think putting `@available(*,unavailable)` attribute to getter or setter would help those people with minimal effect. How do you think about this?

— Hoon H.

+1. I'd also like @available to be available (har har) on stored
properties in addition to computed ones. If that's not really in the
scope for a proposal about @available get/sets I can start a new thread
on it (unless it's simply considered a bug or limitation today).

···

On 1/30/2016 8:29 AM, Hoon H. via swift-evolution wrote:

Sometimes people want to prevent accessing getter/setter method
individually. I think putting `@available(*,unavailable)` attribute to
getter or setter would help those people with minimal effect. How do
you think about this?

— Hoon H.

_______________________________________________
swift-evolution mailing list
swift-evolution@swift.org
https://lists.swift.org/mailman/listinfo/swift-evolution

This proposal is about putting attributes on getters and setters, not the property itself. I didn’t know that was disallowed on stored properties either, and I think you need to start new thread if you want it. Of course if it’s not a bug as you pointed.

— Hoon H.

···

On 2016/01/31, at 04:42 AM, Kevin Lundberg <kevin@klundberg.com> wrote:

+1. I'd also like @available to be available (har har) on stored properties in addition to computed ones. If that's not really in the scope for a proposal about @available get/sets I can start a new thread on it (unless it's simply considered a bug or limitation today).

On 1/30/2016 8:29 AM, Hoon H. via swift-evolution wrote:

Sometimes people want to prevent accessing getter/setter method individually. I think putting `@available(*,unavailable)` attribute to getter or setter would help those people with minimal effect. How do you think about this?

— Hoon H.

_______________________________________________
swift-evolution mailing list
swift-evolution@swift.org <mailto:swift-evolution@swift.org>
https://lists.swift.org/mailman/listinfo/swift-evolution