Re:The Hassle of Haskell
by TheCoelacanth on Monday July 21, 2014 @10:25AM
(#8063796)
Practically every other language does the same thing. For instance in C would you expect `int x;` to be the same as `intx;`?
Re:The Hassle of Haskell
by TheLoneWolfling on Tuesday July 22, 2014 @09:01AM
(#8068687)
No. But I expect this to not be parsed as a single comment:
/* <stuff> */ <stuff> /* <stuff> */I think it's just normal tokenizing. `..-` is a legal name for an operator. An error is given since no operator of that name is in scope.
The alternative of this getting parsed as a range operator and a negative number now and changing to an application of `..-` if that is ever defined or imported doesn't sound very good...
It looks like it is doing basic greedy tokenizing before passing it on to the parser, and, as this shows, that is not the best fit in this case.
Syntactically significant whitespace is seldom a good thing. (With the potential exception of indentation.)