Newbie proposal: operator backquoting

Dusty dusty-aquarius at narod.ru
Mon Jun 25 16:35:49 EDT 2007


> On Thu, Jun 21, 2007 at 09:14:55AM +0400, Dusty wrote:
> >
> > foo '-'1  has two arguments, (-) and 1,                while  foo -1  has one argument, -1
> You mean
>     foo '-'1
> is parsed as
>     (-) foo 1
> and
>     foo -1
> is parsed as
>     foo (-1)
> right?
  Yes! It was my mistake...

> What would
>     foo - 1
> mean? If it means
>     (-) foo 1
> then putting the extra space in looks a lot nicer to me than using
> backquotes. If it means
>     foo (-1)
> then I think this will break a lot of code, and is also very
> unintuitive.
  As for me, it must still parse as foo (-1). While this solution _is_ contra-intuitive, any other variant is _worse_. I suppose, parsing can take differently 0 and 1 spaces, but not 1 and 2...

  Alexander Dakhov.


More information about the Haskell-prime mailing list