[ghc-steering-committee] Records again

Richard Eisenberg rae at richarde.dev
Tue Dec 17 10:39:39 UTC 2019



> On Dec 17, 2019, at 10:32 AM, Joachim Breitner <mail at joachim-breitner.de> wrote:
> 
> I would find it bad, though, if we have
> 
>  f r.x.y = f (r.x.y)
> 
> but disallow or give completely different meaning (as in the bare .y
> variants) to
> 
>  f r.x .y


Just to repeat one of Simon's arguments he used against me yesterday: How do you feel about `f x_y` vs `f x _y`? We have no trouble accepting that whitespace is significant there. If we accept that `.` is part of the construction of a token, then this is all very natural. Somehow, we read `_` this way. If we view `.` as something else, then it's much harder.

I'm in the "view as something else" camp, but the argument above made me realize that I didn't have to revise the whole way I parse Haskell in order to understand the new syntax -- I just have to reclassify the lexical category of `.`.

In the end, I don't feel strongly about this all. And (for me) the authors' comments that `f r.x = (f r).x` is abhorrent carries weight.

Richard
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.haskell.org/pipermail/ghc-steering-committee/attachments/20191217/298f8669/attachment.html>


More information about the ghc-steering-committee mailing list