<div class="gmail_quote">On 13 January 2012 21:24, Grue <span dir="ltr"><<a href="mailto:Grue@nop.com">Grue@nop.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<u></u>





<div bgcolor="#ffffff">
<div><font face="Arial">
<div><font face="Arial"></font> </div>
<blockquote dir="ltr" style="PADDING-RIGHT:0px;PADDING-LEFT:5px;MARGIN-LEFT:5px;BORDER-LEFT:#000000 2px solid;MARGIN-RIGHT:0px"><div class="im">
  <div class="gmail_quote">
  <blockquote class="gmail_quote" style="PADDING-LEFT:1ex;MARGIN:0px 0px 0px 0.8ex;BORDER-LEFT:#ccc 1px solid">The 
    logic is that the precedence in the language matches the<br>precedence of a 
    written equation.<br></blockquote></div><br>
  </div><div class="im"><div>But the operator looks nothing like the written equation... nothing at 
  all like the written equation.</div>
  <div>Perhaps D could support the unicode characters '<font face="arial, helvetica, sans-serif"><font size="4">²</font>' '<font size="4">³</font>' or '<font size="4">ª</font>' as kinda handy operators. But to 
  me, the operator looks NOTHING like maths notation, and it would 
  never </font><span style="FONT-FAMILY:arial,helvetica,sans-serif">have</span><span style="FONT-FAMILY:arial,helvetica,sans-serif"> </span><span style="FONT-FAMILY:arial,helvetica,sans-serif">occurred to me that the 
  operator was trying to emulate maths notation (and by extension, its 
  precedence rules).</span></div>
  <div><font face="arial, helvetica, sans-serif">I'd be interested to see a 
  poll, and how many people see it one way or the other...</font></div>
  <div><font face="Arial"></font> </div></div></blockquote></font></div>
<div><font face="Arial">Beware... your statement has awoken an "Ancient Forum 
Lurker"! ;)</font></div></div></blockquote><div><br></div><div>Sweet! I have that effect :P </div><div>  </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div bgcolor="#ffffff">

<div><font face="Arial">1. Google -5^2, result: -(5^2) = -25</font></div>
<div><font face="Arial">2. Start ancient TI graphing calculator(which by the way 
has a special unary (-) minus operator).</font></div>
<div><font face="Arial">-5^2 = -25</font></div>
<div><font face="Arial">-5<strong>²</strong> = -25</font></div>
<div><font face="Arial"></font> </div>
<div><font face="Arial"><font size="3">The list can be extended by a great 
number of examples of prior convention for the pow operator(especially in 
mathemathical software)... not just Python...</font> <font size="3">I have 
actually never even seen a valid counter example... changing this would greatly 
confuse people with mathematical background.</font></font></div></div></blockquote><div><br></div><div>In my prior post I agreed, though that said, I still maintain that none of those exampled look sufficiently like -5 ^^ 2 by my mind to be considered 'the same thing'. The single ^ and your not using spaces on either side distinguish it quite clearly...</div>
<div>If it weren't for participation in this debate, I would have never clarified this in my mind personally, I can say that with confidence.</div><div>The ^ xor operator was already taken. Promotion of a 'common' (arguable...) function to an operator can only be justified by improving code clarity... I don't think there's any evidence that it does that.</div>
<div><br></div><div>It's funny, I've written a lot of maths code (mostly physics and/or rendering/lighting), but I can probably count the number of times I've used pow() on one hand. I use sqrt(), but I think that's a fairly well established subset of pow(), and people would never use ^^ to perform a sqrt. A function of that rarity possibly doesn't warrant a custom operator :)</div>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div bgcolor="#ffffff"><div><font face="Arial"></font></div></div></blockquote></div>