[swift-evolution] [swift-evolution-announce] [Review] SE-0169: Improve Interaction Between private Declarations and Extensions
Goffredo Marocchi
panajev at gmail.com
Thu Apr 13 02:54:07 CDT 2017
+1
Sent from my iPhone
> On 13 Apr 2017, at 08:15, Tino Heth via swift-evolution <swift-evolution at swift.org> wrote:
>
>> No change
>> Benefit: No change to the language.
>> Drawback: Must use “fileprivate” to build up a type through extensions.
>>
>> SE–0159
>> Benefit: Simplifies the access control model.
>> Drawback: Cannot protect invariants within a file.
>>
>> SE–0169
>> Benefit: Cross-type sharing is clearly marked.
>> Drawback: Must use a helper type to protect invariants within a file.
>>
>> Rename
>> Benefit: No change to semantics.
>> Drawback: Two separate keywords are changed.
>
>
> As the dedicated thread was highjacked ;-), imho it's just fair to add another option here...
>
> Nested extensions
> Benefit: Expressive power, no breaking change (and more…)
> Drawback: More indentation
>
> The table is quite boring:
> Nested Extensions
> Simple file private
> Extensions private
> Sharing private
> Helper visible private
> Helper hidden private
> Invariants private
> Multi-type private
> Multi-type + ext private
>
> I'm not sure about the colour, but if I wasn't to lazy to edit raw HTML, imho there would a lot of green ;-)
> _______________________________________________
> swift-evolution mailing list
> swift-evolution at swift.org
> https://lists.swift.org/mailman/listinfo/swift-evolution
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.swift.org/pipermail/swift-evolution/attachments/20170413/211bc65b/attachment.html>
More information about the swift-evolution
mailing list