[ghc-steering-committee] Proposal: BlockArguments (Shepherd: Joachim)
Joachim Breitner
mail at joachim-breitner.de
Mon Nov 27 14:46:46 UTC 2017
Dear committee,
the BlockArguments (former ArgumentDo) proposal was brought before us:
https://github.com/ghc-proposals/ghc-proposals/pull/90
I’ll shepherd this myself.
The idea is to not require parenthesis around block syntax elements
such as lambda expressions, let bindings, if-then-else, case-of and (in
particular) do expressions. The change to the grammar to enable that is
actually a simplificiation (it removes one non-terminal, lexp).
Variants proposed are:
* do this only for `do` in argument position, or
* do it for all blocks, but only in function argument positions.
I am fond of this proposal, because it allows code with less
parenthesis to be written. If Haskell was written from ground up, I
believe there would be little opposition to this setup, and maybe we
would not have had to hack higher-rank support into ($), as the idiom
`runST $ do …` would just be `runST do …`.
Another argument in favor of it is the mentioned simplificiation of the
grammar rules.
I am aware that reading the parenthesis-free code feels strange to
many, but I not overly worried about that: Every change feels strange,
and in this case, only code that is otherwise illegal is affected.
Akio has indicated that he is willing to work on the implementation.
Therefore, I suggest that we accept this proposal.
Please discuss (or voice you silent agreement).
Regards,
Joachim
--
Joachim Breitner
mail at joachim-breitner.de
http://www.joachim-breitner.de/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: This is a digitally signed message part
URL: <http://mail.haskell.org/pipermail/ghc-steering-committee/attachments/20171127/ef579357/attachment.sig>
More information about the ghc-steering-committee
mailing list