[Haskell-cafe] about Haskell code written to be "too smart"
divisortheory at gmail.com
Tue Mar 24 17:28:27 EDT 2009
On Tue, Mar 24, 2009 at 4:11 PM, Manlio Perillo <manlio_perillo at libero.it>wrote:
> Conal Elliott ha scritto:
>> Another helpful strategy for the reader is to get smarter, i.e. to invest
>> effort in rising to the level of the writer. Or just choose a different
>> book if s/he prefers. - Conal
> This strategy is doomed to failure, unfortunately.
> We live in the real world, compromises are necessary.
It depends, IMO. Making changes to the programming style one uses, in
particular ones such as you propose, would ultimate lead to programs in
haskell being less flexible and/or powerful than if they are. I'm a bit new
to haskell myself, but I do understand that one of the primary uses cases
and/or motivating factors for using Haskell is when you really just NEED
that extra abstraction and power you get from being able to do these types
of things. Someone once said that "simple problems should be simple and
difficult problems should be possible". That doesn't mean the difficult
problems become EASY. One of the best uses for haskell is solving difficult
problems. It's obviously still going to be difficult to solve, and as such
the writer (and hence by extension the reader) is going to have to be smart
C++ is actually beginning to suffer the complexity problem as well,
especially with C++0x, but I fundamentally disagree with the added
complexity in C++, specifically because it is a language which is supposed
to excel at solving solve all kinds of problems. Haskell excels at solving
difficult problems, so I don't think the target audience for Haskell
necessarily needs to include people who can't figure out difficult code.
C++ otoh they need to agree on a target audience or set of problems that
it's geared toward, and then either s**t or get off the pot. It's fine if
they keep adding complexity until the cows come home, but just agree up
front that that's what it is and programmers who aren't cut out for it use a
different language. With Haskell I think you have that up-front agreement,
so there's no problem.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Haskell-Cafe