[ghc-steering-committee] Precedence of r.x

Joachim Breitner mail at joachim-breitner.de
Thu Dec 12 10:23:56 UTC 2019


Hi,

Am Donnerstag, den 12.12.2019, 09:44 +0000 schrieb Simon Peyton Jones. 
> f r.x
> A. The proposal says it means (f (r.x)) 
> B. Joachim wants it to mean ((f r).x)

to give credit where credit is due, this wasn’t my idea:

I came to that conclusion after reading Eric’s mail on this list (from
Tue, 10 Dec 2019 22:27:57 -0500) and Chris Done’s nice summary and
digestion of Eric’s mail as posted in 
https://github.com/ghc-proposals/ghc-proposals/pull/282#issuecomment-564465807

I expect the ability to freely add whitespace on (at least) one side of
a dot, without changing the meaning, is also advantageous to be able to
lay out code nicely.

It seems we gain a lot (e.g. chaining with argument) if we let go of of
the desire to not have to parenthesize non-atomic arguments (in 
`f (r.x) (s.x)`), which we otherwise _always_ do in Haskell (as in
`f (x!!5) (y!!5)`).

Cheers,
Joachim

-- 
Joachim Breitner
  mail at joachim-breitner.de
  http://www.joachim-breitner.de/



More information about the ghc-steering-committee mailing list