<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="">I’d love to have this specific form of this proposal happen. &nbsp;[Were it not that backticks are for naming things after reserved words!]<div class=""><br class=""><div><blockquote type="cite" class=""><div class="">On Jan 7, 2016, at 10:49 PM, Jacob Bandes-Storch 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 dir="ltr" class="">Some other languages provide special syntax to use a binary function as infix:<div class=""><br class=""></div><div class=""><br class=""></div><div class="">Haskell:</div><div class="">&nbsp; &nbsp; foo a b &nbsp; &nbsp;-- is equivalent to</div><div class="">&nbsp; &nbsp; a `foo` b</div><div class=""><br class=""></div><div class="">Mathematica:</div><div class="">&nbsp; &nbsp; Foo[a, b] &nbsp;(*is equivalent to*)</div><div class="">&nbsp; &nbsp; a~Foo~b</div><div class=""><br class=""></div><div class="gmail_extra"><br clear="all" class=""><div class=""><div class="gmail_signature"><div dir="ltr" class=""><div class="">Jacob<br class=""></div></div></div></div>
<br class=""><div class="gmail_quote">On Thu, Jan 7, 2016 at 9:42 PM, Chris Lattner via swift-evolution <span dir="ltr" class="">&lt;<a href="mailto:swift-evolution@swift.org" target="_blank" class="">swift-evolution@swift.org</a>&gt;</span> wrote:<br class=""><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div style="word-wrap:break-word" class=""><span class=""><br class=""><div class=""><blockquote type="cite" class=""><div class="">On Jan 7, 2016, at 5:26 PM, Jo Albright &lt;<a href="mailto:me@jo2.co" target="_blank" class="">me@jo2.co</a>&gt; wrote:</div><br class=""><div class=""><div style="word-wrap:break-word" class=""><div class=""><span style="font-family:Helvetica;font-size:12px;font-style:normal;font-variant:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;float:none;display:inline!important" class=""><div class=""><div class=""><div class=""><div class="">Chris - I really appreciate that you take the time to entertain &amp; respond to proposals.&nbsp;</div></div></div></div><div class=""><br class=""><blockquote type="cite" style="font-weight:normal" class=""><div class="">On Jan 7, 2016, at 7:24 PM, Chris Lattner &lt;<a href="mailto:clattner@apple.com" target="_blank" class="">clattner@apple.com</a>&gt; wrote:</div><br class=""><div class=""><div style="word-wrap:break-word" class=""><br class=""><div class=""><blockquote type="cite" class=""><div class="">On Jan 7, 2016, at 1:31 AM, Jo Albright via swift-evolution &lt;<a href="mailto:swift-evolution@swift.org" target="_blank" class="">swift-evolution@swift.org</a>&gt; wrote:</div><br class=""><div class=""><div style="word-wrap:break-word" class=""><div class="">As my obsession grows with custom operators. I have come across wanting to use small words or 1-2 alphabetical characters as custom operators. I noticed that “as” and “is” are character based operators and figured it wouldn’t hurt to propose the allowance of character based custom operators.</div><div class=""><br class=""></div><div class="">Here are my reasons for allowing them:</div><div class=""><br class=""></div><div class="">1. easier to read “within” vs “&gt;<span style="font-family:Menlo;font-size:11px" class="">*</span>&lt;“ or “|<span style="font-family:Menlo;font-size:11px" class="">*</span>|”&nbsp;</div></div></div></blockquote><div class=""><br class=""></div></div>Check out Replace Logical Operators (&amp;&amp;,&nbsp;||, etc) with words like "and" and “or":<div class=""><a href="https://github.com/apple/swift-evolution/blob/master/commonly_proposed.md" target="_blank" class="">https://github.com/apple/swift-evolution/blob/master/commonly_proposed.md</a></div></div></div></blockquote><div style="font-weight:normal" class=""><br class=""></div>I completely agree with that proposal being rejected. I am not asking to replace existing language grammar. My desire is for the support of alphabetical characters for custom operators to allow&nbsp;<b class="">third party libraries</b><b style="font-weight:normal" class=""> </b>to have their own unique grammar.<br class="">&nbsp;<br class=""><blockquote type="cite" style="font-weight:normal" class=""><div style="word-wrap:break-word" class=""><div class="">There is very small win here of “x foo y” over "x.foo(y)”?</div></div></blockquote><div style="font-weight:normal" class=""><br class=""></div><div style="font-weight:normal" class="">And I completely agree that function/method syntax can easily suffice for normal circumstances. Just trying to see how far Swift can be stretched.</div></div></span></div></div></div></blockquote><br class=""></div></span><div class="">Hi Jo,</div><div class=""><br class=""></div><div class="">The rationale is the same - the design of Swift really wants operators and identifiers to be partitioned into different namespaces.&nbsp; Violating that would make it impossible to parse a swift file without parsing all of its imports.&nbsp; This is a mistake that C made (you have to parse all the headers a file uses to reliably parse the file) that we don’t want to replicate in Swift.</div><div class=""><br class=""></div><div class="">-Chris</div><br class="">
<img src="https://u2002410.ct.sendgrid.net/wf/open?upn=P-2BsYbBZHRBuLDBJaL4DIKDNfkkjpROowTyRAObV11qz6m7-2BHSGYzfIQfSW-2BuN0gBqpHFRkjQ9HVyupfGLXuogvmqXVOM26YtFfoy38VsGF6LTUdk-2BR-2FEVuQqNfmCtT-2F6KltcIGMZUIS3Wk1BnFMRvoH28Ractx1RTbNrWNy1oYNgd65VJch3c-2BOLwL9ch01cs-2FeayrSoTCe5uzyTk-2BBb7Oj5gWartJerl3txp16r3aA-3D" alt="" width="1" height="1" border="0" style="min-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="">_______________________________________________<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" rel="noreferrer" target="_blank" class="">https://lists.swift.org/mailman/listinfo/swift-evolution</a><br class="">
<br class=""></blockquote></div><br class=""></div></div>
<img src="https://u2002410.ct.sendgrid.net/wf/open?upn=NX5pLVYXK-2FsoGvk-2BsN3ORSjM6f2-2BhaPL1hRr1LvA764r4r8663gOOkVhqddnQLNIEhyO-2FDu5XINHX-2BHFnTfqdNOv5u8GiyIhM86jKMbaTc-2FTvVH2AgpyO8omV-2BfnmnDslI7HxCeStiYxxcoQZzFVkTVcbYCD1gUNX8IFm7QELtLQgwbZa44LsQbAvVTAiepSL6mAD1oeDzD3p0lW5ZMca037FnaqbRxXXlAjwcxDROM-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="">
_______________________________________________<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=""></div></body></html>