<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=""><div class="">*&nbsp;What is your evaluation of the proposal?</div><div class=""><br class=""></div><div class="">I am against.</div><div class=""><span style="font-size: 12.8px; line-height: 19.2px;" class=""><br class=""></span></div><div class="">*&nbsp;Is the problem being addressed significant enough to warrant a change to&nbsp;Swift?<br class=""></div><div class=""><br class=""></div><div class="">No.&nbsp;</div><div class=""><br class=""></div><div class="">Quoting the proposal:&nbsp;</div><div class=""><br class=""></div><div class="">&gt; Lets the compiler warn users (and avoids bugs) where the authors mean to use a local variable but instead are unknowingly using an instance property (and the other way round).</div><div class=""><br class=""></div><div class="">I’m unsure that this is so prevalent a programmer error that it should dictate an eventual breaking change in the language (in the proposal, the breaking change would occur starting in Swift 3.0). The provided example shows commented out declaration of a local variable that shadows an instance variable. That is the only apparent situation one would incur mistaken use of an instance member instead of a local variable having the same name. The proposed change seems like a large undertaking to prevent such a situation. Because whenever such a line would *not* be commented out, you would end up using the local variable because it shadows the instance variable.&nbsp;</div><div class=""><br class=""></div><div class="">The accidental commenting out of a local variable declaration would be easier to spot during a review or bug fixing than the “other way round”: meaning to use an instance member, but instead using a local variable. But one can enable the -Wshadow clang flag, and the compiler will omit a warning when shadowing of an instance member by a local variable occurs. That would fulfill the proposal’s desire for a compiler warning––for this case––although it would not be on by default. But for projects concerned by shadowing of instance members, it could be an option.</div><div class=""><br class=""></div><div class="">*&nbsp;Does this proposal fit well with the feel and direction of Swift?</div><div class=""><br class=""></div><div class="">My take on this is more handwave-y and philosophical as a lot of stylistic opinions can be. Requiring use of self when accessing instance members would&nbsp;feel&nbsp;like a vestige from Objective-C because you must do it in Objective-C and not in Swift.</div><div class=""><br class=""></div><div class="">For many, the majority of the time (e.g., when not specifying custom setters or getters for properties), use of properties *feel* much more like direct manipulation of backing storage than in Objective-C because you don’t have to specify `self` as when writing in Objective-C. In Obj-C, when setting or getting some property, you are sending a message to self, so the required syntax, while still boilerplate-y, looks just like invocation of other kinds of methods either using brackets or dot syntax. Default setter and getter synthesis is less apparent in Swift..</div><div class=""><br class=""></div><div class="">*&nbsp;How much effort did you put into your review? A glance, a quick reading, or&nbsp;an in-depth study?</div></div><div class=""><br class=""></div><div class="">Equivalent of a glance. I’ve been writing primarily in Swift for the last few months and being able to omit self has been really nice. It’s one of the places where Swift’s terseness feels most comfortable for me.</div><br class=""><div><blockquote type="cite" class=""><div class="">On Dec 20, 2015, at 7:54 AM, Kevin Lundberg via swift-evolution &lt;<a href="mailto:swift-evolution@swift.org" class="">swift-evolution@swift.org</a>&gt; wrote:</div><br class="Apple-interchange-newline"><div class="">
  
    <meta content="text/html; charset=utf-8" http-equiv="Content-Type" class="">
  
  <div bgcolor="#FFFFFF" text="#000000" class="">
    -1, for this reason, and for the extreme loss in conciseness already
    mentioned elsewhere. The purported extra clarity is not worth the
    extra burden placed on writing code in my opinion. I would favor a
    compiler warning at the most, and this can be solved on an
    individual/team basis with linting tools as well.<br class="">
    <br class="">
    <div class="moz-cite-prefix">On 12/18/2015 1:02 AM, Jed Lewison via
      swift-evolution wrote:<br class="">
    </div>
    <blockquote cite="mid:B18A87B8-7AF7-4736-A929-2870ECA5849D@icloud.com" type="cite" class="">
      <meta http-equiv="Content-Type" content="text/html; charset=utf-8" class="">
      I’m not in favor of this proposal, and rather than repeat
      arguments that have already been made, I thought I’d share a small
      piece of data from the project I’m working on to illustrate the
      impact of implicit self in terms of reducing repetitive
      boilerplate cruft.
      <div class=""><br class="">
      </div>
      <div class="">Our project consists of a legacy ObjC code base for
        an iOS app and a new version written entirely in Swift. The
        feature set is largely the same in both code bases, so it’s a
        good A vs B comparison.
        <div class=""><br class="">
        </div>
        <div class="">In the Objective C version of the app, there are
          ~25,000 explicit references to self. (Keep in mind that this
          could easily have been a much bigger number if there weren’t
          such pervasive usage of ivars in the code.).</div>
        <div class=""><br class="">
        </div>
        <div class="">In the Swift version, there are ~1,000 explicit
          references to self, mostly in initializers and when passing
          self as an argument to a protocol — and about 10% of those
          would disappear with the proposal to allow implicit references
          to self with a strong capture list.</div>
        <div class=""><br class="">
        </div>
        <div class="">I know self is just a 4-letter word, and I know
          Swift’s goal isn’t to reduce character count simply for the
          sake of reducing character count, but it least for our
          project, avoiding “self”-blindness has really mode code more
          readable.<br class="">
          <div class=""><br class="">
          </div>
          <div class=""><br class="">
            <div class="">
              <blockquote type="cite" class="">
                <div class="">On Dec 16, 2015, at 1:55 PM, Douglas
                  Gregor via swift-evolution &lt;<a moz-do-not-send="true" href="mailto:swift-evolution@swift.org" class=""></a><a class="moz-txt-link-abbreviated" href="mailto:swift-evolution@swift.org">swift-evolution@swift.org</a>&gt;
                  wrote:</div>
                <br class="Apple-interchange-newline">
                <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="">Hello Swift community,
                    <div class=""><br class="">
                      <div class="">The review of “Require self for
                        accessing instance members” begins now and runs
                        through Sunday, December 20th. The proposal is
                        available here:</div>
                    </div>
                    <div class=""><br class="">
                    </div>
                    <div class=""><span class="Apple-tab-span" style="white-space: pre;">        </span><a moz-do-not-send="true" href="https://github.com/apple/swift-evolution/blob/master/proposals/0009-require-self-for-accessing-instance-members.md" class=""></a><a class="moz-txt-link-freetext" href="https://github.com/apple/swift-evolution/blob/master/proposals/0009-require-self-for-accessing-instance-members.md">https://github.com/apple/swift-evolution/blob/master/proposals/0009-require-self-for-accessing-instance-members.md</a></div>
                    <div class=""><br class="">
                    </div>
                    <div class="">
                      <div class="">Reviews are an important part of the
                        Swift evolution process. All reviews should be
                        sent to the swift-evolution mailing list at</div>
                      <div class=""><br class="">
                      </div>
                      <div class=""><span class="Apple-tab-span" style="white-space: pre;">        </span><a moz-do-not-send="true" href="https://lists.swift.org/mailman/listinfo/swift-evolution" class=""></a><a class="moz-txt-link-freetext" href="https://lists.swift.org/mailman/listinfo/swift-evolution">https://lists.swift.org/mailman/listinfo/swift-evolution</a></div>
                      <div class=""><br class="">
                      </div>
                      <div class="">or, if you would like to keep your
                        feedback private, directly to the review
                        manager.</div>
                      <div class=""><br class="">
                      </div>
                      <div class="">What goes into a review?</div>
                      <div class=""><br class="">
                        The goal of the review process is to improve the
                        proposal under review through&nbsp;constructive
                        criticism and, eventually, determine the
                        direction of Swift. When&nbsp;writing your review,
                        here are some questions you might want to answer
                        in your&nbsp;review:<br class="">
                        <br class="">
                        <div class=""><span class="Apple-tab-span" style="white-space: pre;">        </span>*&nbsp;What
                          is your evaluation of the proposal?<br class="">
                        </div>
                        <div class=""><span class="Apple-tab-span" style="white-space: pre;">        </span>*&nbsp;Is
                          the problem being addressed significant enough
                          to warrant a change to&nbsp;Swift?<br class="">
                        </div>
                        <div class=""><span class="Apple-tab-span" style="white-space: pre;">        </span>*&nbsp;Does
                          this proposal fit well with the feel and
                          direction of Swift?<br class="">
                        </div>
                        <div class=""><span class="Apple-tab-span" style="white-space: pre;">        </span>*&nbsp;If
                          you have you used other languages or libraries
                          with a similar feature, how do&nbsp;you feel that
                          this proposal compares to those?<br class="">
                        </div>
                        <div class=""><span class="Apple-tab-span" style="white-space: pre;">        </span>*&nbsp;How
                          much effort did you put into your review? A
                          glance, a quick reading, or&nbsp;an in-depth study?<br class="">
                        </div>
                        <br class="">
                      </div>
                      <div class="">More information about the Swift
                        evolution process is available at</div>
                      <div class=""><br class="">
                      </div>
                      <div class=""><span class="Apple-tab-span" style="white-space: pre;">        </span><a moz-do-not-send="true" href="https://github.com/apple/swift-evolution/blob/master/process.md" class=""></a><a class="moz-txt-link-freetext" href="https://github.com/apple/swift-evolution/blob/master/process.md">https://github.com/apple/swift-evolution/blob/master/process.md</a></div>
                      <div class=""><br class="">
                      </div>
                      <div class=""><span class="Apple-tab-span" style="white-space: pre;">        </span>Cheers,</div>
                      <div class=""><span class="Apple-tab-span" style="white-space: pre;">        </span>Doug
                        Gregor</div>
                      <div class=""><span class="Apple-tab-span" style="white-space: pre;">        </span>Review
                        Manager</div>
                    </div>
                    <img moz-do-not-send="true" src="https://u2002410.ct.sendgrid.net/wf/open?upn=p6o4HjCMBoFPyX01HpX5dFXtlJXHR9N02-2Ftww21omcMHRDPvlTDMzY7fVPWZi-2F-2Fxf58-2F6Q0e5WLyJ1U1A23ATr2LIxGq-2FK4SJyea0crqK3rGSWSY0jdTZDdTEmwj58F4oybGLtpkiwEq5xiZjBI3i376iH5lOhNC0qaFKeMOstRjhR6FoBZfE4cEkPreEg6YnOJtTkl0kKrI09-2FniWeJw3Em8Vdu0l9ciCVIHz5c03U-3D" alt="" style="height:1px !important;width:1px
                      !important;border-width:0 !important;margin-top:0
                      !important;margin-bottom:0
                      !important;margin-right:0 !important;margin-left:0
                      !important;padding-top:0
                      !important;padding-bottom:0
                      !important;padding-right:0
                      !important;padding-left:0 !important;" class="" border="0" height="1" width="1">
                  </div>
                  _______________________________________________<br class="">
                  swift-evolution mailing list<br class="">
                  <a moz-do-not-send="true" href="mailto:swift-evolution@swift.org" class="">swift-evolution@swift.org</a><br class="">
<a class="moz-txt-link-freetext" href="https://lists.swift.org/mailman/listinfo/swift-evolution">https://lists.swift.org/mailman/listinfo/swift-evolution</a><br class="">
                </div>
              </blockquote>
            </div>
            <br class="">
          </div>
        </div>
      </div>
      <img moz-do-not-send="true" src="https://u2002410.ct.sendgrid.net/wf/open?upn=AxVqvhl7qaAz-2FE20TrrgNT-2F44XdgxmRgRA416dJII-2BQh709uqWh0ly4h3PuLLbhquV-2FEoTyAKbv35YA9xf8n1tYBertu7VBHtlJSOIOgkllCF-2BGouvFvl9JnubEVoW-2Fxc0nRdIOmxs-2BVV7hz6HEf8rrBy98uAkJWf1Ll-2BFfDUvTI2zCVdG-2BUkbZwhsRS8POXnHucq6GmyQA6FyOiik-2BIStJypkmemHqPY2m8tc6cJJQ-3D" alt="" style="height:1px !important;width:1px
        !important;border-width:0 !important;margin-top:0
        !important;margin-bottom:0 !important;margin-right:0
        !important;margin-left:0 !important;padding-top:0
        !important;padding-bottom:0 !important;padding-right:0
        !important;padding-left:0 !important;" border="0" height="1" width="1" class="">
      <br class="">
      <fieldset class="mimeAttachmentHeader"></fieldset>
      <br class="">
      <pre wrap="" class="">_______________________________________________
swift-evolution mailing list
<a class="moz-txt-link-abbreviated" href="mailto:swift-evolution@swift.org">swift-evolution@swift.org</a>
<a class="moz-txt-link-freetext" href="https://lists.swift.org/mailman/listinfo/swift-evolution">https://lists.swift.org/mailman/listinfo/swift-evolution</a>
</pre>
    </blockquote>
    <br class="">
  
<img src="https://u2002410.ct.sendgrid.net/wf/open?upn=zTY3cGHdvzyP8x280sec9oa8aDdsA-2BDgO8ZI-2BiZR7BxW0hjfAQHfuONCPw6qk-2F2MpW8G9OUIQont2JaHm8wdh0CihRhfTYuZlFXOR8RwsBdBw5ENUXJ7wC-2FfzX9KYNglnZaTXVgRM4dRWfgKn59AQ4oy-2B7TORmGyNW-2BP6m0YzxEPBuqCWwbEzsqZOHKxGh5TbeeEWoJoOlfMl1eozVDK-2BCtC8-2FWuPBfe9i2eUW0U4Fg-3D" alt="" width="1" height="1" border="0" style="height:1px !important;width:1px !important;border-width:0 !important;margin-top:0 !important;margin-bottom:0 !important;margin-right:0 !important;margin-left:0 !important;padding-top:0 !important;padding-bottom:0 !important;padding-right:0 !important;padding-left:0 !important;" class="">
</div>


_______________________________________________<br class="">swift-evolution mailing list<br class=""><a href="mailto:swift-evolution@swift.org" class="">swift-evolution@swift.org</a><br class="">https://lists.swift.org/mailman/listinfo/swift-evolution<br class=""></div></blockquote></div><br class=""></body></html>