[Haskell-cafe] Strange subtract operator behavior

Peter Verswyvelen bf3 at telenet.be
Tue Oct 16 17:12:11 EDT 2007

Concurrent Clean uses the ~ symbol for unary negation. That's also a way 
of fixing it.

Personally I could also live with allowing no space between the minus 
sign and the number... If you leave a space, - becomes the subtract 

Coming from C++ I always make the mistake to forget parentheses around 
negative numbers in Haskell, which is very often needed.

Neil Mitchell wrote:
> Hi
>>> I think you should have to write negative numbers using the syntax
>>> 0-10, since currently having one single unary operator is ugly.
>> I think writing 0-10 is ugly.
> Ugly - yes. But very clear as to its meaning. How often do people
> actually write negative numeric literals? My guess is that -1 is the
> most common by a long way, but even that is quite rare. Of course,
> real statistics of real programs are the only answer.
> Thanks
> Neil

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.haskell.org/pipermail/haskell-cafe/attachments/20071016/677213c5/attachment.htm

More information about the Haskell-Cafe mailing list