[swift-evolution] [Proposal] Property behaviors

Joe Groff jgroff at apple.com
Sat Jan 23 13:30:12 CST 2016

> On Jan 23, 2016, at 8:14 AM, Thorsten Seitz <tseitz42 at icloud.com> wrote:
>> Am 23.01.2016 um 01:33 schrieb Joe Groff via swift-evolution <swift-evolution at swift.org <mailto:swift-evolution at swift.org>>:
>>  changing the proposed syntax for behavior member lookup to 'property.[behavior].member', as suggested by Tal Atlas and others. I think this has a nice symmetry with the `var [behavior]` declaration syntax, and doesn't occupy any new sigils. On the other had, Curt Clifton and others have raised the point that it could be mistaken for a subscript at a glance.
> As a minor issue I’m not very fond of the behavior member lookup syntax because of the similarity to a subscript. The symmetry with the declaration syntax will break down a little bit as soon as the declaration syntax allows a list of composed behaviors.
>> To reduce the complexity of the initial feature review, I've also removed many of the bells and whistles from this initial version for separate consideration. For now, I'm saying initializer requirements are always "eager" (can't refer to self) and always inline-initialized. This imposes some inconvenience on some use cases, but is an additive feature. I've also left behavior composition, extending behaviors, overloading behaviors and […] as future extensions
> I think behavior composition should be included right from the beginning as this might require breaking changes otherwise.

Practically speaking, I think there are inevitably going to be breaking changes here once we get some experience with the feature. It won't ship until 3.0 at the earliest. Many of the other features I've cut, including the initialization generalizations and extensions, would also be ABI-breaking changes at the implementation level.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.swift.org/pipermail/swift-evolution/attachments/20160123/845e5346/attachment.html>

More information about the swift-evolution mailing list