<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote"><div>Proposal link: </div><br style="font-size:12.8px"><span style="font-size:12.8px"> </span><a href="https://github.com/apple/swift-evolution/blob/master/proposals/0144-allow-single-dollar-sign-as-valid-identifier.md" rel="noreferrer" style="font-size:12.8px" target="_blank">https://github.com/apple/swi<wbr>ft-evolution/blob/master/propo<wbr>sals/0144-allow-single-dollar-<wbr>sign-as-valid-identifier.md</a><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"> * What is your evaluation of the proposal?<br></blockquote><div><br></div><div>-1.</div><div><br></div><div>The proposal does not actually provide motivation for keeping $ beyond "the Dollar library already uses it".</div><div><br></div><div>A more Swifty way for a library to introduce these operations would be with extensions. Here are some suggestions, based off the first several operations described in the library's readme:</div><div><br></div><div>$.at → convenience subscript(Index...) for Collection</div><div>$.chunk → convenience function for Sequence</div><div>$.compact → flatMap{$0}</div><div>$.contains → already exists as Sequence.contains</div><div>$.cycle → convenience function for Collection</div><div>$.difference → convenience function on Collection, or just use Set operations, or filter</div><div>$.each → exists as Sequence.forEach</div>$.every → extension on Sequence<div>$.factorial → convenience method or postfix operator for Integer</div><div>$.fetch → convenience function on Collection</div><div>and so on.</div><div><br></div><div>It looks like the author's <a href="https://github.com/ankurp/Cent" target="_blank">Cent</a> library is already taking this approach.</div><div><br></div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
* Is the problem being addressed significant enough to warrant a change to Swift?<br></blockquote><div><br></div><div>Yes, but the change has already been made: removing $ as a valid identifier ;-)</div><div><br></div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
* Does this proposal fit well with the feel and direction of Swift?<br></blockquote><div><br></div><div>Not really. If anything, IMO, the dollar sign feels more like an operator character. (However, it's probably here to stay in identifiers because of closure parameters and LLDB variables.)</div><div><br></div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
* If you have used other languages or libraries with a similar feature, how do you feel that this proposal compares to those?<br></blockquote><div><br></div><div>The Dollar library resembles the style of JavaScript libraries such as jQuery or Underscore, but that isn't a positive thing in my mind — as mentioned above, the Swift way of doing things is different.</div><div><br></div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
* How much effort did you put into your review? A glance, a quick reading, or an in-depth study?<br></blockquote><div><br></div><div>Thorough reading of the proposal; brief glance at the library's readme on GitHub. Lots of time thinking about operator & identifier characters for a forthcoming proposal.</div><div><br></div></div></div></div>