[swift-evolution] access control proposal

Marc Knaup marc at knaup.koeln
Mon Dec 14 12:40:31 CST 2015


This is not true. Extensions in the same file as the type they extend can
see all members of that type. They don't have to be internal.
On Dec 14, 2015 7:29 PM, "Matthew Johnson" <matthew at anandabits.com> wrote:

>
> Well that would break the pattern where you split the implementation of a
> type across several extensions in the same file.
> This is also often done when declaring protocol conformance to break down
> the type into logical pieces.
> I don't want to be forced to squeeze everything into the same body and
> declare a list of a dozen protocol conformance at once.
>
>>
>>
>> No, it doesn't break that pattern at all.   In that case you already need
> to declare members visible to all extensions internal.  Nothing in this
> proposal will prevent you from doing that.  We are discussing use cases
> where a *single* extension, etc has implementation details it wants to keep
> hidden from *everything* outside that single extension.
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.swift.org/pipermail/swift-evolution/attachments/20151214/a2e5e026/attachment.html>


More information about the swift-evolution mailing list