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't THAT reasonable, you say. :) )<br><br> -- Lennart<br><br><br><div>
<span class="gmail_quote">On 10/17/07, <b class="gmail_sendername">John Meacham</b> <<a href="mailto:john@repetae.net">john@repetae.net</a>> 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>> Peter Verswyvelen wrote:<br>> >Personally I could also live with allowing no space between the minus<br>> >sign and the number... If you leave a space, - becomes the subtract
<br>> >operator.<br>><br>> I once thought that... there was the opposition that (x-1) subtraction<br>> of a constant appears too often. And I found that I myself wrote that<br>> several times. And saying "whitespace on the left but not the right"
<br>> seems too complicated for Haskell lexer semantics. So the current<br>> situation is just unhappy, that's all. (and maybe compiler warnings<br>> 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'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> 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>