<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 class=""><blockquote type="cite" class=""><div class="">On May 28, 2016, at 8:11 PM, Brent Royal-Gordon via swift-evolution <<a href="mailto:swift-evolution@swift.org" class="">swift-evolution@swift.org</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><span class="" style="float: none; display: inline !important;">But `protected` is quite different from other access levels; it does not limit the visibility of the symbols, but rather their use. And protocols face the same sort of problem as classes, where certain members are essentially override hooks and shouldn't be called directly outside a particular scope.</span><br class=""><br class=""><span class="" style="float: none; display: inline !important;">So I think we ought to allow `accesslevel(call)`, but not a plain `accesslevel`:</span><br class=""><br class=""><span class="Apple-tab-span" style="white-space: pre;">        </span><span class="" style="float: none; display: inline !important;">public fileprivate(call) func layoutSubviews()</span><br class=""><span class="Apple-tab-span" style="white-space: pre;">        </span><span class="" style="float: none; display: inline !important;">internal fileprivate(call) func privateSubclassingHook()</span><br class=""><span class="Apple-tab-span" style="white-space: pre;">        </span><span class="" style="float: none; display: inline !important;">public internal(set: call) var x = 20</span><br class=""><span class="Apple-tab-span" style="white-space: pre;">        </span><span class="" style="float: none; display: inline !important;">internal(call) func protocolConformanceHook()</span><br class=""><span class="Apple-tab-span" style="white-space: pre;">        </span><span class="" style="float: none; display: inline !important;">fileprivate(set: call) var onlyProtocolSetsThis: Int { get set }</span></div></blockquote></div><div class=""><div class=""><span class="" style="float: none; display: inline !important;"><br class=""></span></div></div><div class=""><span class="" style="float: none; display: inline !important;">Given that this is almost identical to the pitch I floated to the list some months ago, all the way down to the fileprivate(call) syntax (well, back then “fileprivate” was “private”, so it was private(call)), I’m +1 on this.</span></div><br class=""><div><blockquote type="cite" class=""><div class="">On May 29, 2016, at 6:55 PM, Brent Royal-Gordon via swift-evolution <<a href="mailto:swift-evolution@swift.org" class="">swift-evolution@swift.org</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><span style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; float: none; display: inline !important;" class="">The thing is, though, the contents of the sharps drawer are *still* sharp even if you're old enough to use a knife. And similarly, APIs like the `state` setter are *still* dangerous even if you've subclassed `UIGestureRecognizer`. To be sure, it is more likely that you'll *need* to set `state`, but it's still not something you should do carelessly or without understanding the consequences.</span></div></blockquote></div><div class=""><br class=""></div><div class="">This, though, reads like “The 17-year-old might cut himself with a knife, even though he *needs* the knives to help with the cooking. So, let’s give knives to the newborn!”</div><br class=""><div class="">Charles</div><div class=""><br class=""></div></body></html>