[swift-evolution] [Pitch] Memberwise initialisers adopt the same access modifiers as the struct

Matthew Johnson matthew at anandabits.com
Thu Jul 21 11:48:35 CDT 2016



Sent from my iPad

> On Jul 21, 2016, at 11:26 AM, Ian Keen <iankeen82 at gmail.com> wrote:
> 
> I did see that one, however it appeared that proposal didn’t could on the access of the initialiser itself at all? just how it interacts with different properties access levels. It was kinda gargantuan, I’m proposing a single behavioural change for now, rather than introducing a ton of new features.
> 
> I would almost consider this a bug.

This is an additive change so it is out of scope for Swift 3 no matter how small.  There are already plans to revisit the memberwise initialization discussion after Swift 3 is out.  I encourage you to join that discussion when it gets going.

> 
> 
> 
>>> On Jul 20, 2016, at 8:15 PM, Ian Keen via swift-evolution<swift-evolution at swift.org>wrote:
>>> 
>>> Not much to this one… I think the memberwise `init` should follow the same level of access as the struct. It appears to default to `internal` regardless of the struct access modifiers
>>> 
>>> Thoughts?
>> There was an extensive discussion and review of a proposal I put forward early this year for improving memberwise initialization. This topic has been deferred until after Swift 3 wraps up. We’ll be revisiting it in the coming months.
>> 
>>> 
>>> _______________________________________________
>>> swift-evolution mailing list
>>> swift-evolution at swift.org
>>> https://lists.swift.org/mailman/listinfo/swift-evolution
>> 
>> 



More information about the swift-evolution mailing list