If a Property Behavior is 'officially' defined as a syntax sugar:
var _name = ...
var name: Type {
get { return _name }
set { _name = ... }
}
Then allow:
_name.behaviorMember ...
This is simple to implement, understand, and document.
Sent from my iPad
> On 24 Dec 2015, at 5:30 PM, David Waite via swift-evolution
> <[email protected]> wrote:
>
> There was a proposal as well to get property accessor method access directly,
> without referencing the function.
>
> If you had obj#myProperty.get() -> Val and obj#myProperty.set(_:Val) as
> functions (# syntax being a placeholder more than a proposal) perhaps then
> you could also have something like obj#myProperty.clear()
>
> -DW
>
>> On Dec 23, 2015, at 10:07 AM, Joe Groff via swift-evolution
>> <[email protected]> wrote:
>>
>> I agree that "myProperty.clear()" is very appealing, but it has the
>> potential to be confusing when behavior methods are shadowed by members of
>> the front-facing property. You'd still need a way to unambiguously refer to
>> behavior methods when they're shadowed too.
>>
>> -Joe
>
>
> _______________________________________________
> swift-evolution mailing list
> [email protected]
> https://lists.swift.org/mailman/listinfo/swift-evolution
_______________________________________________
swift-evolution mailing list
[email protected]
https://lists.swift.org/mailman/listinfo/swift-evolution