<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 Aug 31, 2017, at 3:17 PM, Dave DeLong &lt;<a href="mailto:delong@apple.com" class="">delong@apple.com</a>&gt; wrote:</div><br class="Apple-interchange-newline"><div class=""><div style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px;" class=""><blockquote type="cite" class=""><div class=""><br class="Apple-interchange-newline">On Aug 31, 2017, at 3:58 PM, David Sweeris &lt;<a href="mailto:davesweeris@mac.com" class="">davesweeris@mac.com</a>&gt; wrote:</div><br class="Apple-interchange-newline"><div class=""><div class="" style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;"><br class=""><div class=""><blockquote type="cite" class=""><div class="">On Aug 31, 2017, at 2:51 PM, Dave DeLong 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="" style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;">Just a side observation…<div class=""><br class=""></div><div class="">One of the downsides I would put forward to notation like this is it massively increases the barrier to entry for anyone else. I look at that “Reduction.agda” file and wonder if I need to go back to school for a degree in Math just to understand what’s going on.</div><div class=""><br class=""></div><div class="">On the other hand, while using inefficient matrix notation may be more verbose, it<span class="Apple-converted-space">&nbsp;</span><i class="">is</i>&nbsp;consistent with the other notation used in programming, which means it is more easily understandable for new-comers to the code.</div></div></div></blockquote><br class=""></div><div class="">New-comers from where? I've met more than one mathematician or physicist who claims they can't code because the syntax isn't what they're used to. People with different backgrounds can and do have vastly different ideas about what constitutes an intuitive syntax for any given semantic (which why I disagree with the notion that having more than one spelling for stuff is inherently bad).</div></div></div></blockquote><br class=""></div><div style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px;" class="">That’s a fair point, which IMO reinforces the notion that changes like this should be an editor-level feature, and not a code-level feature.</div><div style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px;" class=""><br class=""></div><div style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px;" class="">An editor can reformat code (using a font with bazillions of ligatures or whatever) in was that you wouldn’t want to necessarily “hard code”.</div></div></blockquote><br class=""></div><div>To clarify, you're suggesting we do something like this?</div><div><div style="margin: 0px; line-height: normal; font-family: 'Fantasque Sans Mono'; background-color: rgb(0, 57, 70);" class=""><font size="4" class=""><font color="#d55194" class="">@<span style="text-decoration: underline;" class="">p</span>rettyprint</font><font color="#a4b0b1" class="">(</font><font color="#de5194" class="">prefix operator</font><font color="#a4b0b1" class="">&nbsp;</font><span style="color: rgb(215, 96, 27);" class="">"Σ"</span><span style="color: rgb(164, 176, 177);" class="">, </span><span style="color: rgb(106, 129, 136);" class="">/*probably some CSS or something for telling the editor where to position the arguments relative to the operator, whether they're rendered with subscript vs superscript vs normal, etc */</span><span style="color: rgb(164, 176, 177);" class="">)</span></font></div><div style="margin: 0px; line-height: normal; font-family: 'Fantasque Sans Mono'; color: rgb(164, 176, 177); background-color: rgb(0, 57, 70);" class=""><div style="margin: 0px; line-height: normal;" class=""><div style="margin: 0px; line-height: normal;" class=""><div style="margin: 0px; line-height: normal;" class=""><font size="4" class=""><span style="color: rgb(222, 81, 148);" class="">func</span> sum &lt;T: <span style="color: rgb(127, 135, 207);" class="">Numeric</span>, S: <span style="color: rgb(127, 135, 207);" class="">Sequence</span>&gt; (indicies: <span style="color: rgb(127, 135, 207);" class="">S</span>, term: (<span style="color: rgb(127, 135, 207);" class="">S</span>.<span style="color: rgb(127, 135, 207);" class="">Element</span>) -&gt; <span style="color: rgb(127, 135, 207);" class="">T</span>) -&gt; <span style="color: rgb(127, 135, 207);" class="">T</span> {</font></div><div style="margin: 0px; line-height: normal;" class=""><font size="4" class="">&nbsp; <span style="color: #de5194" class="">return</span> indicies.<span style="color: #2c9edb" class="">reduce</span>(<span style="color: #e5493d" class="">0</span>) { $0 + term($1) }</font></div><div style="margin: 0px; line-height: normal;" class=""><font size="4" class="">}</font></div></div></div></div><div class=""><br class=""></div><div class="">Technically speaking, yeah, sure, such a system <i class="">could</i> be made to work.&nbsp;I don't see it getting much support outside of Xcode, though, unless you can convince other languages to adopt the same convention. We'd want people's choice of display style to be driven by personal preference, not whether they can integrate Xcode into their workflow. Speaking of workflows, how far from "plain text" do you think we can get before people start thinking that you need a mac running Xcode to program in Swift?</div><div class=""><br class=""></div><div class="">- Dave Sweeris</div></div></body></html>