[Haskell-cafe] I read somewhere that for 90% of a wide class
of computing problems, you only need 10% of the source code in Haskell,
that you would in an imperative language.
Andrew Coppin
andrewcoppin at btinternet.com
Wed Sep 30 10:43:12 EDT 2009
Peter Verswyvelen wrote:
> I really doubt people tend to think in either way. It's not even sure
> our thinking can be modeled with computing no?
Well, try this: Go ask a random person how you add up a list of numbers.
Most of them will say something about adding the first two together,
adding the third to that total, and so forth. In other words, the step
by step instructions. Very few of them will answer that the sum of an
empty list is defined to be zero, and the sum of a non-empty list is
defined to be the first number plus the sum of the list tail.
Then again, few non-programmers will set anything about creating a
counter variable and initialising it to zero either; this is a
programming "artifact". (Humans don't think like this internally, but
most programming languages conceptually require it.) Nobody has much
difficulty with this, so maybe the only problem with Haskell is that
everybody learns to program "the other way" first, before they get to
Haskell...
More information about the Haskell-Cafe
mailing list