<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=""><br class=""><div><blockquote type="cite" class=""><div class="">On Apr 7, 2017, at 10:32 AM, BJ Homer &lt;<a href="mailto:bjhomer@gmail.com" class="">bjhomer@gmail.com</a>&gt; wrote:</div><br class="Apple-interchange-newline"><div class=""><meta http-equiv="content-type" content="text/html; charset=utf-8" class=""><div dir="auto" class=""><div class=""><br class=""></div><div class="">On Apr 7, 2017, at 9:23 AM, Matthew Johnson &lt;<a href="mailto:matthew@anandabits.com" class="">matthew@anandabits.com</a>&gt; wrote:<br class=""><br class=""></div><blockquote type="cite" class=""><div class="">The most common thing is to have some stored properties that are private and include a handful of fileprivate (or higher) methods that operate on these properties in the type declaration. &nbsp;All members that don’t need direct access to these properties are placed in extensions specifically to <i class="">prevent</i>&nbsp;the direct access to stored properties which they don’t need. &nbsp;This minimizes the lines of code with access to such properties.</div></blockquote><br class=""><div class="">Is there a reason this could not be implemented by putting all the sensitive stored properties in a separate type from the rest of the code?</div></div></div></blockquote><div><br class=""></div><div>This has already been discussed extensively in the threads. &nbsp;The problem with this approach under the current proposal is that there is no way to hide that type or its members from the rest of the file. &nbsp;It can be extended anywhere in the file which means the kind of encapsulation intended by users of scoped access is not really available. &nbsp;This is a kind of half-solution that relies on not extending the separate type and therefore offers a weaker guarantee while requiring extra boilerplate. &nbsp;It is also a kind of half-solution for those who wanted to revert SE-0025. &nbsp;</div><div><br class=""></div><div>Setting aside source compatibility concerns for a brief moment, is there anyone who would choose this approach over reverting SE-0025, renaming the current modifier, or maintaining the current access modifiers? &nbsp;If this is nobody’s first choice that should be a big cautionary sign. &nbsp;It would indicate that this is the result of “design by committee” where nobody really likes it and it is at best the closest to consensus we could get. &nbsp;I don’t think “this is the best we can do because of source compatibility” is an appropriate justification for accepting this kind of solution. &nbsp;If source compatibility is such a paramount concern we should probably maintain the status quo or keep looking for a better, more source-compatible solution in the future (probably Swift 5).</div><div><br class=""></div><div>I think one of the goals for Swift is to try and avoid that kind of decision making. &nbsp;If I’m going to be dissatisfied with part of the language I would rather it be for some other reason than that SE has caused the language to suffer from “design by committee” kinds of flaws.</div><br class=""><blockquote type="cite" class=""><div class=""><div dir="auto" class=""><div class=""><br class=""></div><div class="">-BJ</div></div></div></blockquote></div><br class=""></body></html>