Stefan Monnier <[EMAIL PROTECTED]> writes:

> > 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,
> 
> But then x-2 won't mean "subtract 2 from x" but "call x with arg -2".

Well, since the normal typographical convention is that
"hyphenated-words" are read as closely connected, I've
always been in favour of including hyphen in variable names
and using spaces to separate them from tokens, so perhaps it
should just mean "the identifier 'x-2'".

Though in the days of Unicode we could get round the whole
thing by using code 0x002d for unary minus, 0x2010 in
identifiers and 0x2212 for infix minus... and spend many a
happy hour trying to tell which of the three was intended by
some short horizontal line.

-- 
Jón Fairbairn                                 [EMAIL PROTECTED]
http://www.chaos.org.uk/~jf/Stuff-I-dont-want.html  (updated 2006-07-14)

_______________________________________________
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe

Reply via email to