I have found it strange that operator characters are the only ones that may be used as operators. Sometimes Characters that look like operators are not.<br><br>Why does there need to be a divide?<br><br>Why can't an arbitrary set of characters become operator-ized?<br><br>For example some people would like "and" to become a binary operator and use it instead of "&&"<br><br>If we had the ability to define an operator out of any set of characters I think it would make the swift language a lot better.<br><br>Is there a technical reason why?<br><br><br><div class="gmail_quote"><div dir="ltr">On Tue, Feb 7, 2017 at 2:36 AM David Hart via swift-evolution <<a href="mailto:swift-evolution@swift.org">swift-evolution@swift.org</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="auto" class="gmail_msg"><div class="gmail_msg">And the overjoyed operator: \o/</div></div><div dir="auto" class="gmail_msg"><div class="gmail_msg"><br class="gmail_msg">On 7 Feb 2017, at 08:04, Slava Pestov via swift-evolution <<a href="mailto:swift-evolution@swift.org" class="gmail_msg" target="_blank">swift-evolution@swift.org</a>> wrote:<br class="gmail_msg"><br class="gmail_msg"></div><blockquote type="cite" class="gmail_msg"><div class="gmail_msg">I really have nothing to add to this discussion, except for this fun fact: apparently, the backslash was added to ASCII so you could write /\ and \/ operators: <a href="http://www.bobbemer.com/BACSLASH.HTM" class="gmail_msg" target="_blank">http://www.bobbemer.com/BACSLASH.HTM</a><div class="gmail_msg"><br class="gmail_msg"></div><div class="gmail_msg">Slava</div><div class="gmail_msg"><br class="gmail_msg"><div class="gmail_msg"><blockquote type="cite" class="gmail_msg"><div class="gmail_msg">On Feb 5, 2017, at 7:29 AM, Nicolas Fezans via swift-evolution <<a href="mailto:swift-evolution@swift.org" class="gmail_msg" target="_blank">swift-evolution@swift.org</a>> wrote:</div><br class="m_-3195385432858643814Apple-interchange-newline gmail_msg"><div class="gmail_msg"><div dir="ltr" class="gmail_msg">Dear all,<div class="gmail_msg"><br class="gmail_msg"></div><div class="gmail_msg">This is a rather simple proposal to add '\' (backslash character) as a valid operator-head in the swift grammar.</div><div class="gmail_msg"><br class="gmail_msg"></div><div class="gmail_msg">One argument for it, is that there exist a backslash operator in the MATLAB/Scilab/Octave languages. In this languages A\B solves the linear system A*X = B for X (or the least square problem associated to it if the system of equations is overdetermined). I am doing some numerical computation in Swift and it would be nice to be able to declare the same operator name for this functionality.</div><div class="gmail_msg"><br class="gmail_msg"></div><div class="gmail_msg">I might have missed some arguments for not adding them, but I seems to me that until now the \ character is only used inside of string literals. If that is the case, both uses should never generate a conflict or be ambiguous, isn't it? (String literals keep their interpretation of \ and \ used otherwise within the swift code will be interpreted as an operator or as the beginning of an operator)</div><div class="gmail_msg"><br class="gmail_msg"></div><div class="gmail_msg">I am curious to see what will be the feedback on this.</div><div class="gmail_msg"><br class="gmail_msg"></div><div class="gmail_msg">Nicolas</div></div>
_______________________________________________<br class="gmail_msg">swift-evolution mailing list<br class="gmail_msg"><a href="mailto:swift-evolution@swift.org" class="gmail_msg" target="_blank">swift-evolution@swift.org</a><br class="gmail_msg"><a href="https://lists.swift.org/mailman/listinfo/swift-evolution" class="gmail_msg" target="_blank">https://lists.swift.org/mailman/listinfo/swift-evolution</a><br class="gmail_msg"></div></blockquote></div><br class="gmail_msg"></div></div></blockquote><blockquote type="cite" class="gmail_msg"><div class="gmail_msg"><span class="gmail_msg">_______________________________________________</span><br class="gmail_msg"><span class="gmail_msg">swift-evolution mailing list</span><br class="gmail_msg"><span class="gmail_msg"><a href="mailto:swift-evolution@swift.org" class="gmail_msg" target="_blank">swift-evolution@swift.org</a></span><br class="gmail_msg"><span class="gmail_msg"><a href="https://lists.swift.org/mailman/listinfo/swift-evolution" class="gmail_msg" target="_blank">https://lists.swift.org/mailman/listinfo/swift-evolution</a></span><br class="gmail_msg"></div></blockquote></div>_______________________________________________<br class="gmail_msg">
swift-evolution mailing list<br class="gmail_msg">
<a href="mailto:swift-evolution@swift.org" class="gmail_msg" target="_blank">swift-evolution@swift.org</a><br class="gmail_msg">
<a href="https://lists.swift.org/mailman/listinfo/swift-evolution" rel="noreferrer" class="gmail_msg" target="_blank">https://lists.swift.org/mailman/listinfo/swift-evolution</a><br class="gmail_msg">
</blockquote></div>