Parallel list comprehensions

John Meacham john at repetae.net
Thu Feb 16 04:27:52 EST 2006


(warning. rambling)

On Thu, Feb 16, 2006 at 09:06:24AM +0000, Ross Paterson wrote:
> On Sat, Feb 04, 2006 at 03:11:10PM +0100, John Hughes wrote:
> > I noticed ticket #55--add parallel list comprehensions--which according to
> > the ticket, will probably be adopted. I would argue against.
>
> As there are many voices against and only John M speaking for these,
> it seems reasonable at least to move them from "probably yes" to "maybe".

I don't think that field on the wiki is meant to be taken with more than
a grain of salt. The real meat should be in the pros and cons section on
the attached page.

Part of the reason I really like parallel list comprehensions is that
they give substantially more power to list comprehensions over do
notation. I would be worried about dropping things because people exist
who have not used the feature. For all they know, they might love it
once they start using it. Very little of haskell is manditory so there
really is no need for everyone to explore every corner of the language,
but a lot of the syntax makes our lives easier, sometimes substantially
so.


> > My opinion may be coloured by the fact that I never use the things.
> > However, I think it's a mistake to add rarely used features with
> > a small payoff to the language. It just makes the language larger,
> > harder to learn, and harder to read for all but the expert, without
> > much corresponding benefit.
>
> I agree, but then I feel the same way about pattern guards.  I've used
> them only recently, and that was modifying code (GHC) that already had
> lots of Maybe-returning functions designed for use with pattern guards.

Oh golly. I can't live without pattern guards. they are the best darn
thing since sliced bread. I highly recommend them. I would be anoyed at
not having parallel list comprehensions, but would have to seriously
refactor a ton of code if pattern guards disapeared.

So much so that it would be less work to implement pattern guards for
other compilers and submit the patches.

I also always sort of liked the symmetry between pattern guards, list
comprehensions, and do notation. list comprehensions are do-notation
restricted to the list monad and pattern guards are do notation
restricted to the identity monad...

        John

--
John Meacham - ⑆repetae.net⑆john⑈


More information about the Haskell-prime mailing list