<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=""><span style="font-family: Helvetica, arial, sans-serif; font-size: 14px; background-color: rgb(255, 255, 255);" class="">I have already submitted&nbsp;</span><a href="https://github.com/apple/swift-evolution/pull/617" style="-webkit-print-color-adjust: exact; color: rgb(65, 131, 196); font-family: Helvetica, arial, sans-serif; font-size: 14px;" class="">a new pull-request</a><span style="font-family: Helvetica, arial, sans-serif; font-size: 14px; background-color: rgb(255, 255, 255);" class="">&nbsp;for this modification to the proposal SE-0153. Please you guys feel free to submit your review on GitHub's&nbsp;</span><a href="https://github.com/apple/swift-evolution/pull/617/files" style="-webkit-print-color-adjust: exact; color: rgb(65, 131, 196); font-family: Helvetica, arial, sans-serif; font-size: 14px;" class=""><em style="-webkit-print-color-adjust: exact;" class="">File Changed</em>&nbsp;page</a><span style="font-family: Helvetica, arial, sans-serif; font-size: 14px; background-color: rgb(255, 255, 255);" class="">&nbsp;or just reply this mail directly. Thank you.</span></div><br class=""><div><blockquote type="cite" class=""><div class="">On 18 Feb 2017, at 19:57, Torin Kwok &lt;<a href="mailto:torin@kwok.im" class="">torin@kwok.im</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=""><div class=""><blockquote style="-webkit-print-color-adjust: exact; margin-right: 0px; margin-bottom: 15px; margin-left: 0px; border-left-width: 4px; border-left-style: solid; border-left-color: rgb(221, 221, 221); padding: 0px 15px; color: rgb(119, 119, 119); font-family: Helvetica, arial, sans-serif; font-size: 14px; font-variant-ligatures: normal; orphans: 2; widows: 2; margin-top: 0px !important;" class=""><p style="-webkit-print-color-adjust: exact; margin: 0px 0px 15px;" class="">Proposal link:</p><p style="-webkit-print-color-adjust: exact; margin: 15px 0px 0px;" class=""><a href="https://github.com/apple/swift-evolution/blob/master/proposals/0153-compensate-for-the-inconsistency-of-nscopyings-behaviour.md" class="">https://github.com/apple/swift-evolution/blob/master/proposals/0153-compensate-for-the-inconsistency-of-nscopyings-behaviour.md</a></p></blockquote><p style="-webkit-print-color-adjust: exact; margin: 15px 0px; font-family: Helvetica, arial, sans-serif; font-size: 14px; font-variant-ligatures: normal; orphans: 2; widows: 2;" class="">Reply text:</p><blockquote style="-webkit-print-color-adjust: exact; margin: 15px 0px; border-left-width: 4px; border-left-style: solid; border-left-color: rgb(221, 221, 221); padding: 0px 15px; color: rgb(119, 119, 119); font-family: Helvetica, arial, sans-serif; font-size: 14px; font-variant-ligatures: normal; orphans: 2; widows: 2;" class=""><div style="-webkit-print-color-adjust: exact; margin: 0px;" class="">However, occasionally a constructor might be non-copying on purpose, so we'll need a way to disable the warning.</div></blockquote><p style="-webkit-print-color-adjust: exact; margin: 15px 0px; font-family: Helvetica, arial, sans-serif; font-size: 14px; font-variant-ligatures: normal; orphans: 2; widows: 2;" class="">How about the determination method mentioned in the proposal:</p><blockquote style="-webkit-print-color-adjust: exact; margin: 15px 0px; border-left-width: 4px; border-left-style: solid; border-left-color: rgb(221, 221, 221); padding: 0px 15px; color: rgb(119, 119, 119); font-family: Helvetica, arial, sans-serif; font-size: 14px; font-variant-ligatures: normal; orphans: 2; widows: 2;" class=""><div style="-webkit-print-color-adjust: exact; margin: 0px;" class="">... if developers are performing an assignment operation from within an initializer between&nbsp;<strong style="-webkit-print-color-adjust: exact;" class="">a property declared as&nbsp;<code style="-webkit-print-color-adjust: exact; margin: 0px 2px; padding: 0px 5px; white-space: nowrap; border: 1px solid rgb(234, 234, 234); background-color: rgb(248, 248, 248); border-radius: 3px;" class="">@NSCopying</code></strong>and&nbsp;<strong style="-webkit-print-color-adjust: exact;" class="">an instance of a&nbsp;<nscopying style="-webkit-print-color-adjust: exact;" class="">protocol conforming class</nscopying></strong>.</div></blockquote><p style="-webkit-print-color-adjust: exact; margin: 15px 0px; font-family: Helvetica, arial, sans-serif; font-size: 14px; font-variant-ligatures: normal; orphans: 2; widows: 2;" class="">That is, there are two key factors determining whether a&nbsp;<em style="-webkit-print-color-adjust: exact;" class="">fixable</em>&nbsp;error or warning should be emitted:</p><ul style="-webkit-print-color-adjust: exact; margin: 15px 0px; padding-left: 30px; font-family: Helvetica, arial, sans-serif; font-size: 14px; font-variant-ligatures: normal; orphans: 2; widows: 2;" class=""><li style="-webkit-print-color-adjust: exact; margin: 0px;" class="">If the&nbsp;<em style="-webkit-print-color-adjust: exact; margin-top: 0px;" class="">destination</em>&nbsp;property has been declared as&nbsp;<code style="-webkit-print-color-adjust: exact; margin: 0px 2px; padding: 0px 5px; white-space: nowrap; border: 1px solid rgb(234, 234, 234); background-color: rgb(248, 248, 248); border-radius: 3px;" class="">@NSCopying</code>&nbsp;in class definition</li><li style="-webkit-print-color-adjust: exact; margin: 0px;" class="">If the&nbsp;<em style="-webkit-print-color-adjust: exact; margin-top: 0px;" class="">source</em>&nbsp;value conforms to&nbsp;<code style="-webkit-print-color-adjust: exact; margin: 0px 2px; padding: 0px 5px; white-space: nowrap; border: 1px solid rgb(234, 234, 234); background-color: rgb(248, 248, 248); border-radius: 3px;" class="">&lt;NSCopying&gt;</code>&nbsp;protocol</li></ul><p style="-webkit-print-color-adjust: exact; margin: 15px 0px; font-family: Helvetica, arial, sans-serif; font-size: 14px; font-variant-ligatures: normal; orphans: 2; widows: 2;" class="">Once both are true, then what compiler can be sure about is that developer definitely missed the required manual copy invocation and it would emit either an error or a warning correspondingly. Otherwise, compiler would not complain of anything and would just leave the decision up to developers.</p></div><br class=""><div class=""><blockquote type="cite" class=""><div class="">On 18 Feb 2017, at 18:16, Brent Royal-Gordon 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=""><div class=""><blockquote type="cite" class="">On Feb 17, 2017, at 3:18 PM, Douglas Gregor &lt;<a href="mailto:dgregor@apple.com" class="">dgregor@apple.com</a>&gt; wrote:<br class=""><br class=""><a href="https://github.com/apple/swift-evolution/blob/master/proposals/0153-compensate-for-the-inconsistency-of-nscopyings-behaviour.md" class="">https://github.com/apple/swift-evolution/blob/master/proposals/0153-compensate-for-the-inconsistency-of-nscopyings-behaviour.md</a><br class=""><br class=""><span class="Apple-tab-span" style="white-space:pre">        </span>• What is your evaluation of the proposal?<br class=""></blockquote><br class="">I think a warning is very appropriate.<br class=""><br class="">However, occasionally a constructor might be non-copying on purpose, so we'll need a way to disable the warning. A few possibilities:<br class=""><br class="">* Use .self on the value<br class="">* Parenthesize the value<br class="">* Parenthesize the variable<br class=""><br class="">I don't favor using compiler magic. Too spooky.<br class=""><br class=""><blockquote type="cite" class=""><span class="Apple-tab-span" style="white-space:pre">        </span>• Is the problem being addressed significant enough to warrant a change to Swift?<br class=""></blockquote><br class="">Yeah, that's a pretty easy mistake to make.<br class=""><br class=""><blockquote type="cite" class=""><span class="Apple-tab-span" style="white-space:pre">        </span>• Does this proposal fit well with the feel and direction of Swift?<br class=""></blockquote><br class="">Yes. Swift usually tries to help you avoid mistakes.<br class=""><br class=""><blockquote type="cite" class=""><span class="Apple-tab-span" style="white-space:pre">        </span>• If you have used other languages or libraries with a similar feature, how do you feel that this proposal compares to those?<br class=""></blockquote><br class="">N/A.<br class=""><br class=""><blockquote type="cite" class=""><span class="Apple-tab-span" style="white-space:pre">        </span>• How much effort did you put into your review? A glance, a quick reading, or an in-depth study?<br class=""></blockquote><br class="">Quick reading.<br class=""><br class="">-- <br class="">Brent Royal-Gordon<br class="">Architechies<br class=""><br class="">_______________________________________________<br class="">swift-evolution mailing list<br class=""><a href="mailto:swift-evolution@swift.org" class="">swift-evolution@swift.org</a><br class=""><a href="https://lists.swift.org/mailman/listinfo/swift-evolution" class="">https://lists.swift.org/mailman/listinfo/swift-evolution</a><br class=""></div></div></blockquote></div><br class=""></div></div></blockquote></div><br class=""></body></html>