Re:Haskell RecordDotSyntax language extension proposal (Acce...
by moomin on Monday September 21, 2020 @04:19AM
(#24540996)
Whilst I'm not going to argue the proposal is a bad thing, I think you've just summarized why some are giving it the side eye pretty well.
[ Parent
| on HN ]
Re:Haskell RecordDotSyntax language extension proposal (Acce...
by ben509 on Wednesday September 23, 2020 @11:01AM
(#24567922)
To me it's just, "the dot hugs a field, dot by itself is composition, and module names are capitalized."
While I wouldn't write f. g, if I see it, it's not hugging the field name so it's composition. I don't think I'd have trouble reading it.
But... it will probably trip up newbies and people with odd spacing styles. Hopefully GHC can give a useful error like "In the field selection expression f.g, g is a function defined on XX. Did you mean f . g?"