<html><head><meta http-equiv="Content-Type" content="text/html charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><div><blockquote type="cite" class=""><div class=""><div dir="ltr" class=""><div class=""><div class=""><div class=""><b class="">No change</b></div><div class="">Benefit: No change to the language.</div><div class="">Drawback: Must use “fileprivate” to build up a type through extensions.</div><div class=""><br class=""></div><div class=""><b class="">SE–0159</b></div><div class="">Benefit: Simplifies the access control model.</div><div class="">Drawback: Cannot protect invariants within a file.</div><div class=""><br class=""></div><div class=""><b class="">SE–0169</b></div><div class="">Benefit: Cross-type sharing is clearly marked.</div><div class="">Drawback: Must use a helper type to protect invariants within a file.</div><div class=""><br class=""></div><div class=""><b class="">Rename</b></div><div class="">Benefit: No change to semantics.</div><div class="">Drawback: Two separate keywords are changed.</div></div></div></div></div></blockquote></div><div class=""><br class=""></div>As the dedicated thread was highjacked ;-), imho it's just fair to add another option here...<br class=""><div><br class=""></div><div><b class="">Nested extensions</b></div>Benefit: Expressive power, no breaking change (and more…)<div class="">Drawback: More indentation</div><div class=""><br class=""></div><div class="">The table is quite boring:</div><div class=""><table style="-webkit-print-color-adjust: exact; margin-right: 0px; margin-left: 0px; padding: 0px; border-collapse: collapse; color: rgb(0, 0, 0); font-family: Helvetica, arial, sans-serif; font-size: 14px; background-color: rgb(255, 255, 255); margin-top: 0px !important; margin-bottom: 0px !important;" class=""><thead style="-webkit-print-color-adjust: exact;" class=""><tr style="-webkit-print-color-adjust: exact; border-top-width: 1px; border-top-style: solid; border-top-color: rgb(204, 204, 204); margin: 0px; padding: 0px;" class=""><th style="-webkit-print-color-adjust: exact; border: 1px solid rgb(204, 204, 204); margin: 0px; padding: 6px 13px;" class=""></th><th style="-webkit-print-color-adjust: exact; border: 1px solid rgb(204, 204, 204); margin: 0px; padding: 6px 13px;" class="">Nested Extensions</th></tr></thead><tbody style="-webkit-print-color-adjust: exact;" class=""><tr style="-webkit-print-color-adjust: exact; border-top-width: 1px; border-top-style: solid; border-top-color: rgb(204, 204, 204); margin: 0px; padding: 0px;" class=""><td style="-webkit-print-color-adjust: exact; border: 1px solid rgb(204, 204, 204); margin: 0px; padding: 6px 13px;" class="">Simple file</td><td style="-webkit-print-color-adjust: exact; border: 1px solid rgb(204, 204, 204); margin: 0px; padding: 6px 13px;" class="">private</td></tr><tr style="-webkit-print-color-adjust: exact; border-top-width: 1px; border-top-style: solid; border-top-color: rgb(204, 204, 204); background-color: rgb(248, 248, 248); margin: 0px; padding: 0px;" class=""><td style="-webkit-print-color-adjust: exact; border: 1px solid rgb(204, 204, 204); margin: 0px; padding: 6px 13px;" class="">Extensions</td><td style="-webkit-print-color-adjust: exact; border: 1px solid rgb(204, 204, 204); margin: 0px; padding: 6px 13px;" class="">private</td></tr><tr style="-webkit-print-color-adjust: exact; border-top-width: 1px; border-top-style: solid; border-top-color: rgb(204, 204, 204); margin: 0px; padding: 0px;" class=""><td style="-webkit-print-color-adjust: exact; border: 1px solid rgb(204, 204, 204); margin: 0px; padding: 6px 13px;" class="">Sharing</td><td style="-webkit-print-color-adjust: exact; border: 1px solid rgb(204, 204, 204); margin: 0px; padding: 6px 13px;" class="">private</td></tr><tr style="-webkit-print-color-adjust: exact; border-top-width: 1px; border-top-style: solid; border-top-color: rgb(204, 204, 204); background-color: rgb(248, 248, 248); margin: 0px; padding: 0px;" class=""><td style="-webkit-print-color-adjust: exact; border: 1px solid rgb(204, 204, 204); margin: 0px; padding: 6px 13px;" class="">Helper visible</td><td style="-webkit-print-color-adjust: exact; border: 1px solid rgb(204, 204, 204); margin: 0px; padding: 6px 13px;" class="">private</td></tr><tr style="-webkit-print-color-adjust: exact; border-top-width: 1px; border-top-style: solid; border-top-color: rgb(204, 204, 204); margin: 0px; padding: 0px;" class=""><td style="-webkit-print-color-adjust: exact; border: 1px solid rgb(204, 204, 204); margin: 0px; padding: 6px 13px;" class="">Helper hidden</td><td style="-webkit-print-color-adjust: exact; border: 1px solid rgb(204, 204, 204); margin: 0px; padding: 6px 13px;" class="">private</td></tr><tr style="-webkit-print-color-adjust: exact; border-top-width: 1px; border-top-style: solid; border-top-color: rgb(204, 204, 204); background-color: rgb(248, 248, 248); margin: 0px; padding: 0px;" class=""><td style="-webkit-print-color-adjust: exact; border: 1px solid rgb(204, 204, 204); margin: 0px; padding: 6px 13px;" class="">Invariants</td><td style="-webkit-print-color-adjust: exact; border: 1px solid rgb(204, 204, 204); margin: 0px; padding: 6px 13px;" class="">private</td></tr><tr style="-webkit-print-color-adjust: exact; border-top-width: 1px; border-top-style: solid; border-top-color: rgb(204, 204, 204); margin: 0px; padding: 0px;" class=""><td style="-webkit-print-color-adjust: exact; border: 1px solid rgb(204, 204, 204); margin: 0px; padding: 6px 13px;" class="">Multi-type</td><td style="-webkit-print-color-adjust: exact; border: 1px solid rgb(204, 204, 204); margin: 0px; padding: 6px 13px;" class="">private</td></tr><tr style="-webkit-print-color-adjust: exact; border-top-width: 1px; border-top-style: solid; border-top-color: rgb(204, 204, 204); background-color: rgb(248, 248, 248); margin: 0px; padding: 0px;" class=""><td style="-webkit-print-color-adjust: exact; border: 1px solid rgb(204, 204, 204); margin: 0px; padding: 6px 13px;" class="">Multi-type + ext</td><td style="-webkit-print-color-adjust: exact; border: 1px solid rgb(204, 204, 204); margin: 0px; padding: 6px 13px;" class="">private</td></tr></tbody></table><div class=""><br class=""></div></div><div class="">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 ;-)</div></body></html>