[Haskell-cafe] Re: Implicit concatenation in list comprehensions

Jon Fairbairn jon.fairbairn at cl.cam.ac.uk
Wed Jul 22 05:06:35 EDT 2009

Bulat Ziganshin <bulat.ziganshin at gmail.com> writes:

> Hello Neil,
> Tuesday, July 21, 2009, 1:26:55 PM, you wrote:
>>>  ++ [ "-i"      | not (null (ghcOptSearchPath opts)) ]
>>>  ++ [ "-i", dir | dir <- ghcOptSearchPath opts ]
>> Following the discussions, I now support this extension too - I keep
>> seeing more and more places in my code where it would be very useful.
>>>  ++        [ "-i"        | not (null (ghcOptSearchPath opts)) ]
>>>  ++ concat [ ["-i", dir] | dir <- ghcOptSearchPath opts ]

That looks good enough to convince me that new syntax gains too little
here. When adding stuff to the syntax you have to be very careful about
interactions between forms, and possible errors. The more you add, the
more likely it is that something horrible gets overlooked. And learning
haskell becomes more tedious (you have to learn stuff that you'd never
use because other people will).

Having a fairly small amount of flexible syntax (and Haskell is already
pushing the boundaries of "fairly small") together with powerful
abstraction tools is far better than having a syntax so huge that no-one
can see how weak the abstractions are... I keep trying, but I don't
think I can finish this posting without mentioning Perl, whose
aficionados have so much investment in having learned all that crap that
they can't see how awful it is.

Jón Fairbairn                                 Jon.Fairbairn at cl.cam.ac.uk

More information about the Haskell-Cafe mailing list