
On Thu, Aug 17, 2006 at 11:14:32AM +0100, Brian Hulley wrote:
I'd have thought it would have been simpler to just make the rule that -2 (no spaces between '-' and '2') would be a single lexeme, and then people could just use (negate x) or (0 - x) instead of having a special rule and a whole lot of confusion just for one arithmetic operator, which is never actually needed in the first place (just as we don't need /x because it is simple enough to write 1/x).
yes yes yes. the current handling of - is a huge wart that needs to be excised. I run into issues with it still and grumble to myself, and have been programming haskell for years. '-' should be part of the numerical lexical syntax and not be special in any other way. we alreday have . being treated as lexically part of a number, and 'e', and 'x' in certain cases, so why the special anoying case for '-'?
I see with great disappointment that Haskell' Trac ticket#50 [1] looks as if it will not be accepted [2] so we're likely to be stuck with this for years to come...
[1] http://hackage.haskell.org/trac/haskell-prime/ticket/50 [2] http://hackage.haskell.org/trac/haskell-prime/wiki/StrawPoll-2
I hope this changes. John -- John Meacham - ⑆repetae.net⑆john⑈