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.

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
44 messages Options
123
Reply | Threaded
Open this post in threaded view
|

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.

caseyh
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.

If this is true, it needs to be pushed.

And if by changing a few lines of source code one can develop a whole
family of similar applications, that needs to be pushed, also.

:)
--
Regards,
Casey
_______________________________________________
Haskell-Cafe mailing list
[hidden email]
http://www.haskell.org/mailman/listinfo/haskell-cafe
Reply | Threaded
Open this post in threaded view
|

Re: 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.

Jason Dagit-2


On Tue, Sep 29, 2009 at 5:24 PM, Casey Hawthorne <[hidden email]> wrote:
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.

If this is true, it needs to be pushed.

And if by changing a few lines of source code one can develop a whole
family of similar applications, that needs to be pushed, also.

If you look through the archives here and elsewhere on the net, I think you'll see that technical superiority isn't the driving force for language adoption.  It can help, but other factors seem to play a more significant role, usually dependent on context in which the languages became popular.  At times it can seem like luck, but then I'm reminded of what Louis Pasteur said about luck and prepared minds.

It is good that you're talking about Haskell though.  Continue to discuss it with your peers and show them fun and cool things you've written using Haskell.  I think this is more compelling for the uninitiated than statements about perceived technical power of the language.  I've heard people explain this as, "showing is better than telling."

Cheers,
Jason

_______________________________________________
Haskell-Cafe mailing list
[hidden email]
http://www.haskell.org/mailman/listinfo/haskell-cafe
Reply | Threaded
Open this post in threaded view
|

Re: 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.

caseyh
On Tue, 29 Sep 2009 18:19:08 -0700, you wrote:

>On Tue, Sep 29, 2009 at 5:24 PM, Casey Hawthorne <[hidden email]> wrote:
>
>> 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.
>>
>> If this is true, it needs to be pushed.
>>
>> And if by changing a few lines of source code one can develop a whole
>> family of similar applications, that needs to be pushed, also.
>>
>
>If you look through the archives here and elsewhere on the net, I think
>you'll see that technical superiority isn't the driving force for language
>adoption.  It can help, but other factors seem to play a more significant
>role, usually dependent on context in which the languages became popular.
>At times it can seem like luck, but then I'm reminded of what Louis Pasteur
>said about luck and prepared minds.
>
>It is good that you're talking about Haskell though.  Continue to discuss it
>with your peers and show them fun and cool things you've written using
>Haskell.  I think this is more compelling for the uninitiated than
>statements about perceived technical power of the language.  I've heard
>people explain this as, "showing is better than telling."
>
>Cheers,
>Jason

Hmmmmmmm!

Like those people that are paid to go into coffee houses with some new
technology, and then people see what they're doing and wander over and
ask them questions about it.

>"showing is better than telling."

It's even being used by marketers/sellers.

:)
--
Regards,
Casey
_______________________________________________
Haskell-Cafe mailing list
[hidden email]
http://www.haskell.org/mailman/listinfo/haskell-cafe
Reply | Threaded
Open this post in threaded view
|

Re: 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.

Daniel Peebles
We should have GHC 6.12 launch parties like the Windows 7 ones ;)

(if you haven't seen it, and are feeling masochistic:
http://www.youtube.com/watch?v=1cX4t5-YpHQ)

Dan

On Tue, Sep 29, 2009 at 9:36 PM, Casey Hawthorne <[hidden email]> wrote:

> On Tue, 29 Sep 2009 18:19:08 -0700, you wrote:
>
>>On Tue, Sep 29, 2009 at 5:24 PM, Casey Hawthorne <[hidden email]> wrote:
>>
>>> 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.
>>>
>>> If this is true, it needs to be pushed.
>>>
>>> And if by changing a few lines of source code one can develop a whole
>>> family of similar applications, that needs to be pushed, also.
>>>
>>
>>If you look through the archives here and elsewhere on the net, I think
>>you'll see that technical superiority isn't the driving force for language
>>adoption.  It can help, but other factors seem to play a more significant
>>role, usually dependent on context in which the languages became popular.
>>At times it can seem like luck, but then I'm reminded of what Louis Pasteur
>>said about luck and prepared minds.
>>
>>It is good that you're talking about Haskell though.  Continue to discuss it
>>with your peers and show them fun and cool things you've written using
>>Haskell.  I think this is more compelling for the uninitiated than
>>statements about perceived technical power of the language.  I've heard
>>people explain this as, "showing is better than telling."
>>
>>Cheers,
>>Jason
>
> Hmmmmmmm!
>
> Like those people that are paid to go into coffee houses with some new
> technology, and then people see what they're doing and wander over and
> ask them questions about it.
>
>>"showing is better than telling."
>
> It's even being used by marketers/sellers.
>
> :)
> --
> Regards,
> Casey
> _______________________________________________
> Haskell-Cafe mailing list
> [hidden email]
> http://www.haskell.org/mailman/listinfo/haskell-cafe
>
_______________________________________________
Haskell-Cafe mailing list
[hidden email]
http://www.haskell.org/mailman/listinfo/haskell-cafe
Reply | Threaded
Open this post in threaded view
|

Re: 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
In reply to this post by caseyh
Casey Hawthorne wrote:

> 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.
>
> If this is true, it needs to be pushed.
>
> And if by changing a few lines of source code one can develop a whole
> family of similar applications, that needs to be pushed, also.
>
> :)
>  

As one C++ expert I know is fond of telling me, "Haskell will only
become popular when obscure mathematics becomes popular".

You can argue about whether or not this is true. Myself I think we just
need to start documenting things more clearly. (E.g., Mr C++ apparently
spent half an hour trying to figure out why an expression wouldn't
parse. Turns out you have to write negative numbers in brackets. Which
isn't hard, but you have to already know this.)

I might also point out that 90% of all desktop computers run Windows,
and yet every single C library binding on Hackage fails to compile on
Windows. That really needs to be fixed. (Not to mention some of the
standard I/O functions doing slightly strange things because GHC is
calling POSIX compatibility functions rather than native I/O functions.
For example, doesDirectoryExist "C:\\" = False.)

The lack of a big shiny whizzy-looking IDE probably stops quite a few
people too. (I gather the Leksah guys are working on that one.)

Lack of a good way to write native-looking Windows GUI applications - or
indeed any GUI applications without requiring a stack of DLLs - probably
doesn't help either.

None of these look fundamentally insumountable to me.

(Mr C++ argues that homo sapiens fundamentally think in an imperative
way, and therefore functional programming in general will never be
popular. We shall see...)

_______________________________________________
Haskell-Cafe mailing list
[hidden email]
http://www.haskell.org/mailman/listinfo/haskell-cafe
Reply | Threaded
Open this post in threaded view
|

Re: 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.

Deniz Dogan-3
2009/9/30 Andrew Coppin <[hidden email]>:
> (Mr C++ argues that homo sapiens fundamentally think in an imperative way,
> and therefore functional programming in general will never be popular.

Sounds more like Mr C++ fundamentally thinks in an imperative way
because that's what he is used to.

I recently started working with C# and struggled for way too long with
for/foreach loops to do things that in Haskell could be expressed
using only folding, mapping and filtering. When I realised that those
ideas actually exist in System.Linq I suddenly started liking the
language a bit more.

txtCommaSeparatedNames.Text.Split(',').Select(x => x.Trim()).Where(x
=> x.Length > 0).Select(x => Convert.ToInt32(x)).ToList();

Ah, the joy of FP.

--
Deniz Dogan
_______________________________________________
Haskell-Cafe mailing list
[hidden email]
http://www.haskell.org/mailman/listinfo/haskell-cafe
Reply | Threaded
Open this post in threaded view
|

Re: 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.

Peter Verswyvelen-2
Yep, LINQ makes C# more enjoyable :-)  Scala and haXe also look nice, a bit of a mix between OCaml/F#, C#/Java and Haskell. 

Besides the fact that hacking in Haskell is a great deal of fun, the main reason I see for learning Haskell: it makes you a better programmer.  After a couple of years of playing with Haskell, I can now solve problems that I couldn't before. It's of course hard to tell if Haskell is the reason here, or just experience, but I feel it really is Haskell (actually, functional programming). Haskell made me see the world in a different way (and if I see Oleg's and co's code, I still have an infinitely long road ahead.

The main reason why you should not learn Haskell: it's a bit of a drug; after you learned Haskell, programming in an "industrial strength" language suddenly feels like a waste of time, time better spent learning more Haskell...

On Wed, Sep 30, 2009 at 10:26 AM, Deniz Dogan <[hidden email]> wrote:
2009/9/30 Andrew Coppin <[hidden email]>:
> (Mr C++ argues that homo sapiens fundamentally think in an imperative way,
> and therefore functional programming in general will never be popular.

Sounds more like Mr C++ fundamentally thinks in an imperative way
because that's what he is used to.

I recently started working with C# and struggled for way too long with
for/foreach loops to do things that in Haskell could be expressed
using only folding, mapping and filtering. When I realised that those
ideas actually exist in System.Linq I suddenly started liking the
language a bit more.

txtCommaSeparatedNames.Text.Split(',').Select(x => x.Trim()).Where(x
=> x.Length > 0).Select(x => Convert.ToInt32(x)).ToList();

Ah, the joy of FP.

--
Deniz Dogan
_______________________________________________
Haskell-Cafe mailing list
[hidden email]
http://www.haskell.org/mailman/listinfo/haskell-cafe


_______________________________________________
Haskell-Cafe mailing list
[hidden email]
http://www.haskell.org/mailman/listinfo/haskell-cafe
Reply | Threaded
Open this post in threaded view
|

Re: 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
In reply to this post by Deniz Dogan-3
Deniz Dogan wrote:
> 2009/9/30 Andrew Coppin <[hidden email]>:
>  
>> (Mr C++ argues that homo sapiens fundamentally think in an imperative way,
>> and therefore functional programming in general will never be popular.
>>    
>
> Sounds more like Mr C++ fundamentally thinks in an imperative way
> because that's what he is used to.
>  

Entirely plausible, yes.

Consider, for a moment, the task of counting how many elements there are
in a linked list. The imperative way:

   "Initialise counter to zero. Start at the beginning of the list. If
we have reached the end of the list, return the counter. Otherwise,
increase the counter by one and fetch the next list node."

The FP way:

   "The size of an empty list is zero. The size of a nonempty list is
one plus the sum of the suffix of the list."

It does read kind of like a riddle. It's not even immediately obvious
that this is the entire definition. (Unless you already happen to be a
maths nerd, like myself.)

The first one reads like a list of instructions explaining HOW to count
the list size. The second reads more like a definition of WHAT the list
size is. It doesn't immediately look like there's even a way to execute
this. (They don't call it declarative programming for nothing...)

I note in passing that, even in English, the FP version is shorter. ;-)

I think if you wanted to count the size of a tree, it seems a lot more
natural though:

   "If this is a leaf node, return one. Otherwise: Initialise counter to
zero. Count size of left subtree and add to counter. Count size of right
subtree and add to counter. Return counter."
   "The size of a leaf node is one. The size of a branch node is the sum
of the sizes of the two subtrees."

Arguably most people are probably more accustomed to thinking in terms
of "do this, do that, do the other" (think about, e.g., a cooking recipy
or a task list) then they are to defining task goals as self-referential
riddles.

On the other hand, from what I've experienced, computer programming is
already a task that some people "get", and others simply don't. Maybe in
another forty years, all programming will be functional programming, and
anybody who doesn't "get" recursion just won't become a programmer? Who
knows...

> Ah, the joy of FP.
>  

Amen!

_______________________________________________
Haskell-Cafe mailing list
[hidden email]
http://www.haskell.org/mailman/listinfo/haskell-cafe
Reply | Threaded
Open this post in threaded view
|

Re: 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.

Salvatore Insalaco
In reply to this post by Andrew Coppin
On Wed, Sep 30, 2009 at 9:32 AM, Andrew Coppin
<[hidden email]> wrote:
> I might also point out that 90% of all desktop computers run Windows, and
> yet every single C library binding on Hackage fails to compile on Windows.
> That really needs to be fixed. (Not to mention some of the standard I/O
> functions doing slightly strange things because GHC is calling POSIX
> compatibility functions rather than native I/O functions. For example,
> doesDirectoryExist "C:\\" = False.)

This is a problem of C / Posix, not a problem of Haskell. Haskell C
bindings compile on Windows without issues IF the corrisponding
library is available. It is compiling the (usually posix) C library in
Windows the real issue.

Anyway, on Windows Vista, cmd.exe:

GHCi, version 6.10.4: http://www.haskell.org/ghc/  :? for help
Prelude> :m System.Directory
Prelude System.Directory> doesDirectoryExist "C:\\"
True

Salvatore
_______________________________________________
Haskell-Cafe mailing list
[hidden email]
http://www.haskell.org/mailman/listinfo/haskell-cafe
Reply | Threaded
Open this post in threaded view
|

Re: 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.

Jochem Berndsen-3
In reply to this post by Deniz Dogan-3
Deniz Dogan wrote:
> 2009/9/30 Andrew Coppin <[hidden email]>:
>> (Mr C++ argues that homo sapiens fundamentally think in an imperative way,
>> and therefore functional programming in general will never be popular.
>
> Sounds more like Mr C++ fundamentally thinks in an imperative way
> because that's what he is used to.

This may or may not be true. It would be interesting to see some
research on this. Without that, I think we cannot decide either way.
Cheers, Jochem

--
Jochem Berndsen | [hidden email] | jochem@牛在田里.com
_______________________________________________
Haskell-Cafe mailing list
[hidden email]
http://www.haskell.org/mailman/listinfo/haskell-cafe
Reply | Threaded
Open this post in threaded view
|

Re: 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.

Peter Verswyvelen-2
I really doubt people tend to think in either way. It's not even sure our thinking can be modeled with computing no?

On Wed, Sep 30, 2009 at 1:58 PM, Jochem Berndsen <[hidden email]> wrote:
Deniz Dogan wrote:
> 2009/9/30 Andrew Coppin <[hidden email]>:
>> (Mr C++ argues that homo sapiens fundamentally think in an imperative way,
>> and therefore functional programming in general will never be popular.
>
> Sounds more like Mr C++ fundamentally thinks in an imperative way
> because that's what he is used to.

This may or may not be true. It would be interesting to see some
research on this. Without that, I think we cannot decide either way.
Cheers, Jochem

--
Jochem Berndsen | [hidden email] | [hidden email]
_______________________________________________
Haskell-Cafe mailing list
[hidden email]
http://www.haskell.org/mailman/listinfo/haskell-cafe


_______________________________________________
Haskell-Cafe mailing list
[hidden email]
http://www.haskell.org/mailman/listinfo/haskell-cafe
Reply | Threaded
Open this post in threaded view
|

RE: I read somewhere that for 90% of a wide classof computing problems, you only need 10% of the source code in Haskell, that you would in an imperative language.

Kalani Thielen
In reply to this post by Andrew Coppin
Re: [Haskell-cafe] I read somewhere that for 90% of a wide classof computing problems, you only need 10% of the source code in Haskell,that you would in an imperative language.
> As one C++ expert I know is fond of telling me, "Haskell will only
> become popular when obscure mathematics becomes popular".

That might be true, but the calculus and even arithmetic were once considered obscure.

_______________________________________________
Haskell-Cafe mailing list
[hidden email]
http://www.haskell.org/mailman/listinfo/haskell-cafe
Reply | Threaded
Open this post in threaded view
|

Re: I read somewhere that for 90% of a wide classof computing problems, you only need 10% of the source code in Haskell, that you would in an imperative language.

Peter Verswyvelen-2
Mmm, to the average student calculus is still very obscure ;-)

On Wed, Sep 30, 2009 at 3:56 PM, Kalani Thielen <[hidden email]> wrote:
> As one C++ expert I know is fond of telling me, "Haskell will only
> become popular when obscure mathematics becomes popular".

That might be true, but the calculus and even arithmetic were once considered obscure.

_______________________________________________
Haskell-Cafe mailing list
[hidden email]
http://www.haskell.org/mailman/listinfo/haskell-cafe



_______________________________________________
Haskell-Cafe mailing list
[hidden email]
http://www.haskell.org/mailman/listinfo/haskell-cafe
Reply | Threaded
Open this post in threaded view
|

Re: 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.

Stefan Monnier
In reply to this post by Andrew Coppin
> I might also point out that 90% of all desktop computers run Windows, and
> yet every single C library binding on Hackage fails to compile on
> Windows.  That really needs to be fixed.

Luckily, this is being fixed ... by the Free Software movement.


        Stefan

_______________________________________________
Haskell-Cafe mailing list
[hidden email]
http://www.haskell.org/mailman/listinfo/haskell-cafe
Reply | Threaded
Open this post in threaded view
|

Re: 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
In reply to this post by Peter Verswyvelen-2
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
[hidden email]
http://www.haskell.org/mailman/listinfo/haskell-cafe
Reply | Threaded
Open this post in threaded view
|

Re: 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.

David Leimbach
In reply to this post by Andrew Coppin


On Wed, Sep 30, 2009 at 12:32 AM, Andrew Coppin <[hidden email]> wrote:
Casey Hawthorne wrote:
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.

If this is true, it needs to be pushed.

And if by changing a few lines of source code one can develop a whole
family of similar applications, that needs to be pushed, also.

:)
 

As one C++ expert I know is fond of telling me, "Haskell will only become popular when obscure mathematics becomes popular".

You can argue about whether or not this is true. Myself I think we just need to start documenting things more clearly. (E.g., Mr C++ apparently spent half an hour trying to figure out why an expression wouldn't parse. Turns out you have to write negative numbers in brackets. Which isn't hard, but you have to already know this.)


It's clear Haskell has become popular, and without the need for the obscure math.  (though I have to admit, I find the math highly interesting, yet I'm quite the novice)
 
I might also point out that 90% of all desktop computers run Windows, and yet every single C library binding on Hackage fails to compile on Windows. That really needs to be fixed. (Not to mention some of the standard I/O functions doing slightly strange things because GHC is calling POSIX compatibility functions rather than native I/O functions. For example, doesDirectoryExist "C:\\" = False.)


YES
 
The lack of a big shiny whizzy-looking IDE probably stops quite a few people too. (I gather the Leksah guys are working on that one.)


I personally have found 2 IDEs to be "worth bothering with" in my entire life.  One is Visual Studio. The other is Borland's Turbo C++ 3.0 IDE for DOS.  (I even coerced it to run on my 16MHz 286.... geeze 16MHz was fast back then :-) )
 
Lack of a good way to write native-looking Windows GUI applications - or indeed any GUI applications without requiring a stack of DLLs - probably doesn't help either.

None of these look fundamentally insumountable to me.

(Mr C++ argues that homo sapiens fundamentally think in an imperative way, and therefore functional programming in general will never be popular. We shall see...)

I think that's a bunch of garbage :-).  People think algorithmically, or we wouldn't design algorithms to deal with complexity.  Algorithms very often have steps that are quite imperative, but many of the sub-pieces of a step are clearly pure and functional.

Being able to see the difference in a set of instructions, and being able to isolate them, can be quite a powerful way to break a problem down to a manageable set of steps.

If it wasn't, Functional Programming would have died long ago, and it clearly hasn't, and is gaining ground.  See F#, Erlang, O'Caml, and Haskell.  I don't think you can argue with the quantitative data that is the user base.  The number of people in #haskell on freenode, or the subscribers on Reddit.

People are paying attention and trying it out.  Whether haskell will completely fail to "Avoid success at all costs" or not is hard to say :-).  In fact, Intel is porting their concurrent collections libraries to Haskell now.

How's that for an endorsement?  (It *was* just a C++ library).  Tell your friend to stick that in their pipe and smoke it... then pass it to me! :-)

Dave
 

_______________________________________________
Haskell-Cafe mailing list
[hidden email]
http://www.haskell.org/mailman/listinfo/haskell-cafe


_______________________________________________
Haskell-Cafe mailing list
[hidden email]
http://www.haskell.org/mailman/listinfo/haskell-cafe
Reply | Threaded
Open this post in threaded view
|

Re: 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.

Daniel Fischer-4
In reply to this post by Andrew Coppin
Am Mittwoch 30 September 2009 09:32:08 schrieb Andrew Coppin:
> I might also point out that 90% of all desktop computers run Windows,
> and yet every single C library binding on Hackage fails to compile on
> Windows. That really needs to be fixed.

Contribute your share, switch to Linux or BSD 8-)
_______________________________________________
Haskell-Cafe mailing list
[hidden email]
http://www.haskell.org/mailman/listinfo/haskell-cafe
Reply | Threaded
Open this post in threaded view
|

Re: 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.

Peter Verswyvelen-2
In reply to this post by Andrew Coppin
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; etc..."

On Wed, Sep 30, 2009 at 4:43 PM, Andrew Coppin <[hidden email]> 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
[hidden email]
http://www.haskell.org/mailman/listinfo/haskell-cafe


_______________________________________________
Haskell-Cafe mailing list
[hidden email]
http://www.haskell.org/mailman/listinfo/haskell-cafe
Reply | Threaded
Open this post in threaded view
|

Re: I read somewhere that for 90% of a wide classof computing problems, you only need 10% of the source code in Haskell, that you would in an imperative language.

Alexey Khudyakov
In reply to this post by Peter Verswyvelen-2
В сообщении от 30 сентября 2009 18:05:28 Peter Verswyvelen написал:

> On Wed, Sep 30, 2009 at 3:56 PM, Kalani Thielen <[hidden email]> wrote:
> > That might be true, but the calculus and even arithmetic were once
> > considered obscure.
>
> Mmm, to the average student calculus is still very obscure ;-)
>

Really? One professor said that it's possible to teach monkey to differentiate.
In principle I agree with him (-;
_______________________________________________
Haskell-Cafe mailing list
[hidden email]
http://www.haskell.org/mailman/listinfo/haskell-cafe
Reply | Threaded
Open this post in threaded view
|

Re: 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.

Alexey Khudyakov
In reply to this post by Jochem Berndsen-3
В сообщении от 30 сентября 2009 15:58:40 Jochem Berndsen написал:

> Deniz Dogan wrote:
> > 2009/9/30 Andrew Coppin <[hidden email]>:
> >> (Mr C++ argues that homo sapiens fundamentally think in an imperative
> >> way, and therefore functional programming in general will never be
> >> popular.
> >
> > Sounds more like Mr C++ fundamentally thinks in an imperative way
> > because that's what he is used to.
>
> This may or may not be true. It would be interesting to see some
> research on this. Without that, I think we cannot decide either way.
> Cheers, Jochem
>
One of my first impressiions with haskell was absence of impendance mismatch
between my thoughts and my code. This is not nessesarily true for everyone
because people has different ways of thinking I beleive.

P.S. And haskell doesn't have tendency to eat brain away like C++ does.
_______________________________________________
Haskell-Cafe mailing list
[hidden email]
http://www.haskell.org/mailman/listinfo/haskell-cafe
123