
On Wed, Jul 6, 2016 at 10:39 AM, Bardur Arantsson
On 07/04/2016 12:31 PM, Akio Takano wrote:
Hi glasgow-haskell-users,
I have written a wiki page about a proposed extension called ArgumentDo. It's a small syntactic extension that allows "do" expressions, lambdas and a few other kinds of expressions to be used as function arguments, without parentheses.
https://ghc.haskell.org/trac/ghc/wiki/ArgumentDo
Any feedback is appreciated. In particular, since the idea has received mixed support (see the "Discussion" section on the wiki page), I'd like to make sure that there is enough support for this feature to justify an implementation in GHC.
-1
Reasons have already been given in previous threads on this. However, I'd point especially to the fact that people don't *agree* that this is more readable as a very strong point against -- regardless of whether any one individual thinks it's more readable or not. The point is the there seems to be a lot of disagreement -- that indicates to me that this cannot by definition be a "clear win"[1]. Disclosure: I personally find it less readable because of the implicitness. Implicitness which has a non-trivial probability of affecting semantics is bad in my book. Frankly, if it came to it, I'd rather just remove $ and deal with the parentheses.
I'm -1 because I think there are already too many styles. So I don't agree with the general sentiment that the parser should accept lots of stuff and to rely on style guides to specify something, because in practice everyone has their own style guide. I trained myself to see juxtaposition as highest precedence (which newcomers still struggle over) and it's confusing to see juxtaposition that has higher precedence because one of them is a keyword. In the same way I'm confused by 'f a { b = c }', but it's too late to change that one. I suppose this is already on the wiki page in the "cons" section.