[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.
bugfact at gmail.com
Wed Sep 30 10:59:43 EDT 2009
Sure, but it doesn't mean that because someone uses an imperative way of
counting, that it means people's brains work imperatively all the way.
People tend to talk and communicate a lot in a declarative way no? For
example ask someone that doesn't know programming how he we would make a
paddleball game. I have no idea what that person would say, but I think it
would something like: "I tell the computer that the paddle should move along
with the mouse; and when the ball bounces against the paddle, the ball
reverses direction; if the paddle misses the ball, it's game over". I don't
think anybody would say: "each frame, the ball's position moves by a tiny
timestep; when the mouse is sampled, copy the mouse position to the paddle;
On Wed, Sep 30, 2009 at 4:43 PM, Andrew Coppin
<andrewcoppin at btinternet.com>wrote:
> 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...
> Haskell-Cafe mailing list
> Haskell-Cafe at haskell.org
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Haskell-Cafe