[Haskell-cafe] Let's teach GHC idiom brackets!

Henrik Nilsson Henrik.Nilsson at nottingham.ac.uk
Wed Feb 18 22:13:26 UTC 2015

Edward Kmett wrote:

 > My experience with them is pretty close to Tikhon's here, so I'm
 > pretty much neutral on whether we go ahead and do this. Idiom
 > brackets seem to have some strident supporters, I just have never
 > personally had a case where I worked through what the idiom bracket
 > version was and found the result appreciably clearer. When you need
 > to mix in joins and regular application it gets quite messy.

I agree. I've written quite a lot of applicative code (very) long before
it was even called applicative, and I never found it particularly
burdensome to be explicit. On the other hand, I'd say being able
to easily mix regular application and join is essential.

 > Do we still need idiom brackets if we have ApplicativeDo?

Wasn't aware of this proposal, but I must say it does look rather
verbose compared to the explicit version, so nothing gained in that
sense, and, more importantly, it obscures the key point of applicative:
that arguments *cannot* depend on each other.

So from that perspective, if yet more special syntax must be introduced,
idiom brackets would seem preferable. But personally, I'd rather there
was no more special syntax unless it truly makes a difference, like
for monads and (even more so) arrows.



Henrik Nilsson
School of Computer Science
The University of Nottingham
nhn at cs.nott.ac.uk

This message and any attachment are intended solely for the addressee
and may contain confidential information. If you have received this
message in error, please send it back to me, and immediately delete it. 

Please do not use, copy or disclose the information contained in this
message or in any attachment.  Any views or opinions expressed by the
author of this email do not necessarily reflect the views of the
University of Nottingham.

This message has been checked for viruses but the contents of an
attachment may still contain software viruses which could damage your
computer system, you are advised to perform your own checks. Email
communications with the University of Nottingham may be monitored as
permitted by UK legislation.

More information about the Haskell-Cafe mailing list