<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 May 27, 2016, at 8:51 PM, Austin Zheng 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=""><div dir="ltr" class="">Hello swift-evolution,<div class=""><br class=""></div><div class="">I've put together a preliminary v2 of the proposal, taking into account feedback expressed on this thread. I would appreciate any comments, suggestions, or criticisms.</div><div class=""><br class=""></div><div class=""><a href="https://github.com/austinzheng/swift-evolution/blob/az-edit-89/proposals/0089-rename-string-reflection-init.md" class="">https://github.com/austinzheng/swift-evolution/blob/az-edit-89/proposals/0089-rename-string-reflection-init.md</a><br class=""></div><div class=""><br class=""></div><div class="">If any objections can be worked out quickly, I hope to resubmit this proposal for review early next week.</div></div></div></blockquote><br class=""></div><div>Thank you for doing this Austin!</div><div><br class=""></div><div>Here are some random comments:</div><br class=""><div class="">"which accidentally invokes this initializer by accident” -> "which accidentally invokes this initializer”</div><div class=""><br class=""></div><div class=""><br class=""></div><div class="">"A new protocol will be introduced: ValuePreservingStringConvertible. “ -> Thanks for adding the init requirement. It might be worth mentioning up at top that an alternative name to consider is “LosslessStringConvertible”. </div><div class=""><br class=""></div><div class="">"protocol ValuePreservingStringConvertible {“ -> "protocol ValuePreservingStringConvertible : CustomStringConvertible {"</div><div class=""><br class=""></div><div class="">"<span style="color: rgb(51, 51, 51); font-family: Consolas, 'Liberation Mono', Menlo, Courier, monospace; font-size: 14px; background-color: rgb(247, 247, 247);" class=""> </span><span class="pl-k" style="font-family: Consolas, 'Liberation Mono', Menlo, Courier, monospace; font-size: 14px; background-color: rgb(247, 247, 247); box-sizing: border-box; color: rgb(167, 29, 93);">var</span><span style="color: rgb(51, 51, 51); font-family: Consolas, 'Liberation Mono', Menlo, Courier, monospace; font-size: 14px; background-color: rgb(247, 247, 247);" class=""> stringRepresentation </span><span class="pl-k" style="font-family: Consolas, 'Liberation Mono', Menlo, Courier, monospace; font-size: 14px; background-color: rgb(247, 247, 247); box-sizing: border-box; color: rgb(167, 29, 93);">:</span><span style="color: rgb(51, 51, 51); font-family: Consolas, 'Liberation Mono', Menlo, Courier, monospace; font-size: 14px; background-color: rgb(247, 247, 247);" class=""> </span><span class="pl-c1" style="font-family: Consolas, 'Liberation Mono', Menlo, Courier, monospace; font-size: 14px; background-color: rgb(247, 247, 247); box-sizing: border-box; color: rgb(0, 134, 179);">String</span><span style="color: rgb(51, 51, 51); font-family: Consolas, 'Liberation Mono', Menlo, Courier, monospace; font-size: 14px; background-color: rgb(247, 247, 247);" class=""> { </span><span class="pl-k" style="font-family: Consolas, 'Liberation Mono', Menlo, Courier, monospace; font-size: 14px; background-color: rgb(247, 247, 247); box-sizing: border-box; color: rgb(167, 29, 93);">get</span><span style="color: rgb(51, 51, 51); font-family: Consolas, 'Liberation Mono', Menlo, Courier, monospace; font-size: 14px; background-color: rgb(247, 247, 247);" class=""> }"</span><br style="color: rgb(51, 51, 51); font-family: Consolas, 'Liberation Mono', Menlo, Courier, monospace; font-size: 14px; background-color: rgb(247, 247, 247);" class=""></div><div class=""><span style="color: rgb(51, 51, 51); font-family: Consolas, 'Liberation Mono', Menlo, Courier, monospace; font-size: 14px; background-color: rgb(247, 247, 247);" class=""><br class=""></span></div>Just speaking for my opinion, but I think this is better to keep as description. We don’t want multiple different string forms, because at the end of the day string literal interpolation and print need to do “something”, and description should be that default form. If that form isn’t lossless, then the type shouldn’t have access to the labelless string initializer.<div class=""><br class=""></div><div class=""><pre style="box-sizing: border-box; font-family: Consolas, 'Liberation Mono', Menlo, Courier, monospace; font-size: 14px; margin-top: 0px; margin-bottom: 0px; line-height: 1.45; word-wrap: normal; padding: 16px; overflow: auto; background-color: rgb(247, 247, 247); border-top-left-radius: 3px; border-top-right-radius: 3px; border-bottom-right-radius: 3px; border-bottom-left-radius: 3px; word-break: normal; color: rgb(51, 51, 51);" class=""> <span class="pl-k" style="box-sizing: border-box; color: rgb(167, 29, 93);">init</span>?(stringRepresentation: <span class="pl-c1" style="box-sizing: border-box; color: rgb(0, 134, 179);">String</span>)
</pre><div class=""><br class=""></div><div class="">Since this is a lossless conversion when it succeeds, it should be unlabeled.</div><div class=""><br class=""></div><div class="">"<span style="color: rgb(51, 51, 51); font-family: 'Helvetica Neue', Helvetica, 'Segoe UI', Arial, freesans, sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol'; font-size: 16px; background-color: rgb(255, 255, 255);" class="">The standard library will be audited."</span></div><div class=""><br class=""></div><div class="">This is prescriptive statement: the proposal should include the actual list of types in the stdlib.</div><div class=""><br class=""></div><div class="">"The Foundation SDK overlay will be audited in the same manner.”</div><div class=""><br class=""></div><div class="">-> Foundation is handled separately, it should be left out of the proposal.</div><div class=""><br class=""></div><div class=""><br class=""></div><div class=""><br class=""></div><div class=""><span style="color: rgb(51, 51, 51); font-family: 'Helvetica Neue', Helvetica, 'Segoe UI', Arial, freesans, sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol'; font-size: 16px; background-color: rgb(255, 255, 255);" class="">"If they conform to </span><code style="box-sizing: border-box; font-family: Consolas, 'Liberation Mono', Menlo, Courier, monospace; font-size: 14px; padding: 0.2em 0px; margin: 0px; background-color: rgba(0, 0, 0, 0.0392157); border-top-left-radius: 3px; border-top-right-radius: 3px; border-bottom-right-radius: 3px; border-bottom-left-radius: 3px; color: rgb(51, 51, 51);" class="">CustomStringConvertible</code><span style="color: rgb(51, 51, 51); font-family: 'Helvetica Neue', Helvetica, 'Segoe UI', Arial, freesans, sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol'; font-size: 16px; background-color: rgb(255, 255, 255);" class=""> and their existing </span><code style="box-sizing: border-box; font-family: Consolas, 'Liberation Mono', Menlo, Courier, monospace; font-size: 14px; padding: 0.2em 0px; margin: 0px; background-color: rgba(0, 0, 0, 0.0392157); border-top-left-radius: 3px; border-top-right-radius: 3px; border-bottom-right-radius: 3px; border-bottom-left-radius: 3px; color: rgb(51, 51, 51);" class="">description</code><span style="color: rgb(51, 51, 51); font-family: 'Helvetica Neue', Helvetica, 'Segoe UI', Arial, freesans, sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol'; font-size: 16px; background-color: rgb(255, 255, 255);" class=""> is value-preserving, </span><code style="box-sizing: border-box; font-family: Consolas, 'Liberation Mono', Menlo, Courier, monospace; font-size: 14px; padding: 0.2em 0px; margin: 0px; background-color: rgba(0, 0, 0, 0.0392157); border-top-left-radius: 3px; border-top-right-radius: 3px; border-bottom-right-radius: 3px; border-bottom-left-radius: 3px; color: rgb(51, 51, 51);" class="">stringRepresentation</code><span style="color: rgb(51, 51, 51); font-family: 'Helvetica Neue', Helvetica, 'Segoe UI', Arial, freesans, sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol'; font-size: 16px; background-color: rgb(255, 255, 255);" class=""> will simply return </span><code style="box-sizing: border-box; font-family: Consolas, 'Liberation Mono', Menlo, Courier, monospace; font-size: 14px; padding: 0.2em 0px; margin: 0px; background-color: rgba(0, 0, 0, 0.0392157); border-top-left-radius: 3px; border-top-right-radius: 3px; border-bottom-right-radius: 3px; border-bottom-left-radius: 3px; color: rgb(51, 51, 51);" class="">description</code><span style="color: rgb(51, 51, 51); font-family: 'Helvetica Neue', Helvetica, 'Segoe UI', Arial, freesans, sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol'; font-size: 16px; background-color: rgb(255, 255, 255);" class="">."</span><br class="Apple-interchange-newline"><br class="">With the structure above, this isn’t necessary.</div></div><div class=""><br class=""></div><div class=""><br class=""></div><div class="">Thank you for driving this forward Austin!</div><div class=""><br class=""></div><div class="">-Chris</div><div class=""><br class=""></div></body></html>