If naturals have a perfectly reasonable subtraction then they also have a perfectly reasonable negate; the default is 0-x.<br><br>(Oh, subtraction wasn&#39;t THAT reasonable, you say. :) )<br><br>&nbsp; -- Lennart<br><br><br><div>
<span class="gmail_quote">On 10/17/07, <b class="gmail_sendername">John Meacham</b> &lt;<a href="mailto:john@repetae.net">john@repetae.net</a>&gt; wrote:</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
On Tue, Oct 16, 2007 at 06:27:19PM -0300, Isaac Dupree wrote:<br>&gt; Peter Verswyvelen wrote:<br>&gt; &gt;Personally I could also live with allowing no space between the minus<br>&gt; &gt;sign and the number... If you leave a space, - becomes the subtract
<br>&gt; &gt;operator.<br>&gt;<br>&gt; I once thought that... there was the opposition that (x-1) subtraction<br>&gt; of a constant appears too often.&nbsp;&nbsp;And I found that I myself wrote that<br>&gt; several times.&nbsp;&nbsp;And saying &quot;whitespace on the left but not the right&quot;
<br>&gt; seems too complicated for Haskell lexer semantics.&nbsp;&nbsp;So the current<br>&gt; situation is just unhappy, that&#39;s all. (and maybe compiler warnings<br>&gt; could still be implemented)<br><br>not just unhappy, but inefficient.
<br>-10 tranlates to (negate (fromInteger 10)) requiring 2 indirect class<br>calls rather than what one might expect (fromInteger -10)<br><br>also, negate in Num is sort of ugly IMHO. It would be nice if it wern&#39;t<br>
there. Things like naturals have a perfectly reasonable subtract, but no<br>negate.<br><br>I think losing x-1 would be worth it. but I know there were some other<br>ideas out there that might be preferable but could still be handled at
<br>the lexing stage rather than the parsing one...<br><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;John<br><br><br>--<br>John Meacham - ⑆repetae.net⑆john⑈<br>_______________________________________________<br>Haskell-Cafe mailing list<br><a href="mailto:Haskell-Cafe@haskell.org">
Haskell-Cafe@haskell.org</a><br><a href="http://www.haskell.org/mailman/listinfo/haskell-cafe">http://www.haskell.org/mailman/listinfo/haskell-cafe</a><br></blockquote></div><br>