<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="">Let me bump this thread. How do we move forward?<div class=""><br class=""></div><div class="">Here's an interface of another Swift class I've just made (slowly rewriting my Obj-C components to Swift here):<div class=""><br class=""></div><blockquote style="margin: 0 0 0 40px; border: none; padding: 0px;" class=""><div class="">public class SoloContainerViewController: UIViewController {</div><div class=""><br class=""></div><div class=""> private var _contentViewController: UIViewController?</div><div class=""><br class=""></div><div class=""> public var contentViewController: UIViewController? // delegates to setContentViewController:animated:completion:</div><div class=""><br class=""></div><div class=""> public init(contentViewController: UIViewController?) { ... }</div><div class=""><br class=""></div><div class=""> public required init?(coder aDecoder: NSCoder) { ... }</div><div class=""><br class=""></div><div class=""> public override func viewDidLoad() { ... }</div><div class=""><br class=""></div><div class=""> public func setContentViewController(contentViewController: UIViewController?, animated: Bool, completion completionBlock: dispatch_block_t?) { ... }</div><div class=""><br class=""></div><div class=""> public<b class=""> /*protected*/</b> func transition(fromView oldView: UIView?, toView newView: UIView?, animated: Bool, completion completionBlock: (finished: Bool) -> Void) { ... }</div><div class=""><br class=""></div><div class=""> public <b class="">/*protected*/</b> func willTransitionToContentViewController(newViewController: UIViewController?) { ... }</div><div class=""><br class=""></div><div class=""> public <b class="">/*protected*/</b> func didTransitionFromContentViewController(oldViewController: UIViewController?) { ... }</div><div class=""><br class=""></div><div class="">}</div></blockquote><div class=""><br class=""></div><div class="">This is madness, we have to do SOMETHING!</div><div class=""><br class=""></div><div class="">This class is designed to be subclassed, with a bunch of hooks that subclasses may be interested in. Most of the reusable views and view controllers that I make look like this.</div><div class=""><br class=""></div><div class="">Even when I use delegates, I still forward delegate calls through overridable protected methods, based on my long history of subclassing UIScrollView (and other controls) and wishing that the subclass had access to the delegate methods.</div><div class=""><br class=""></div><div class=""><div class="">Nobody outside of the class should be interested in those protected methods; they are not safe to call, they're override points.</div></div><div class=""><br class=""></div><div class="">And I often have to pick very telling method names, so that I don't end up accidentally calling one of those methods from outside. Sometimes that's fairly hard, like when there's a public save(), a private saveNow() and a protected saveContent().</div><div class=""><br class=""></div><div class=""><br class=""></div><div class="">Our best consensus the last time was:<br class=""><div class=""><br class=""><div class=""><div><blockquote type="cite" class=""><div class=""><meta http-equiv="Content-Type" content="text/html charset=utf-8" class=""><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><div class=""><blockquote type="cite" class=""><div class=""><div 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;" class=""><blockquote type="cite" class=""><div class=""><span class="" 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;">My point is that "protected" *isn't* access control. If we added it, it would have to be as an independent modifier.</span><br class="" 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;"></div></blockquote></div></div></blockquote><div class=""><br class=""></div><div class="">Okay. So you see it as “public subclassonly”, leaving space for “internal subclassonly” (which makes sense, although not as important in practice).</div><div class=""><br class=""></div><div class="">I can agree with that, let's consider it a new strawman.</div></div></div></div></blockquote><div><br class=""></div></div><br class=""></div></div></div><div class="">So how do we move forward?</div><div class=""><br class=""></div><div class="">A.</div><div class=""><br class=""></div></div></body></html>