[swift-evolution] [swift-evolution-announce] [Review] SE-0169: Improve Interaction Between private Declarations and Extensions
panajev at gmail.com
Thu Apr 13 02:54:07 CDT 2017
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.
>> Benefit: Simplifies the access control model.
>> Drawback: Cannot protect invariants within a file.
>> Benefit: Cross-type sharing is clearly marked.
>> Drawback: Must use a helper type to protect invariants within a file.
>> 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
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the swift-evolution