Gmail Calendar Documents Reader Web more »
Recently Visited Groups | Help | Sign in
Google Groups Home
Newbie: what are the advantages of Haskell?
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  Messages 1 - 25 of 36 - Collapse all  -  Translate all to Translated (View all originals)   Newer >
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
phi...@free.fr  
View profile  
 More options Apr 26 2007, 12:48 pm
Newsgroups: fa.haskell
From: phi...@free.fr
Date: Thu, 26 Apr 2007 16:48:29 UTC
Local: Thurs, Apr 26 2007 12:48 pm
Subject: [Haskell] Newbie: what are the advantages of Haskell?
Hello,

what are the advantages of haskell over semi-functional programming languages
such as Perl, Common Lisp, etc.?

What are the mysterious "side effects" which are avoided by using Haskell, which
everyone talks about? Null pointers?

Don't you ever get null pointers in Haskell, including when doing IO?

Aren't Haskell's advantages outweighed by its complexity (Monads, etc.) and
rigidity?

Last but not least, I would like to learn from those among you who are former
PERL developers, why you switched to Haskell.

Many thanks.

phiroc

_______________________________________________
Haskell mailing list
Hask...@haskell.org
http://www.haskell.org/mailman/listinfo/haskell


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Johannes Waldmann  
View profile  
(1 user)  More options Apr 26 2007, 12:52 pm
Newsgroups: fa.haskell
From: Johannes Waldmann <waldm...@imn.htwk-leipzig.de>
Date: Thu, 26 Apr 2007 16:52:12 UTC
Local: Thurs, Apr 26 2007 12:52 pm
Subject: Re: [Haskell] Newbie: what are the advantages of Haskell?

phi...@free.fr wrote:
> [...] semi-functional programming languages such as Perl [...]

now this is an interesting view ...

_______________________________________________
Haskell mailing list
Hask...@haskell.org
http://www.haskell.org/mailman/listinfo/haskell


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Discussion subject changed to "[Haskell] Newbie: what are the advantages of Haskell?" by Joel Reymont
Joel Reymont  
View profile  
(1 user)  More options Apr 26 2007, 12:58 pm
Newsgroups: fa.haskell
From: Joel Reymont <joe...@gmail.com>
Date: Thu, 26 Apr 2007 16:58:06 UTC
Local: Thurs, Apr 26 2007 12:58 pm
Subject: [Haskell-cafe] Re: [Haskell] Newbie: what are the advantages of Haskell?
The biggest advantage of Haskell to me is that it helps me write  
better programs in other languages.

For one reason or another Haskell never turns out to be my final  
implementation language my my programs gain in the process.

        Joel

--
http://wagerlabs.com/

_______________________________________________
Haskell-Cafe mailing list
Haskell-C...@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Discussion subject changed to "Newbie: what are the advantages of Haskell?" by phi...@free.fr
phi...@free.fr  
View profile  
(1 user)  More options Apr 26 2007, 1:03 pm
Newsgroups: fa.haskell
From: phi...@free.fr
Date: Thu, 26 Apr 2007 17:03:11 UTC
Local: Thurs, Apr 26 2007 1:03 pm
Subject: Re: [Haskell] Newbie: what are the advantages of Haskell?
If this is interesting then please enlighten a poor, ignorant PERL hacker.

Quoting Johannes Waldmann <waldm...@imn.htwk-leipzig.de>:

> phi...@free.fr wrote:

> > [...] semi-functional programming languages such as Perl [...]

> now this is an interesting view ...

_______________________________________________
Haskell mailing list
Hask...@haskell.org
http://www.haskell.org/mailman/listinfo/haskell

    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Sebastian Sylvan  
View profile  
(1 user)  More options Apr 26 2007, 1:27 pm
Newsgroups: fa.haskell
From: "Sebastian Sylvan" <sebastian.syl...@gmail.com>
Date: Thu, 26 Apr 2007 17:27:25 UTC
Local: Thurs, Apr 26 2007 1:27 pm
Subject: Re: [Haskell] Newbie: what are the advantages of Haskell?

(note to Haskellers: Yeah, I'm handwaving things here, no need to point out
counter-examples to my generalisations!)

On 4/26/07, phi...@free.fr <phi...@free.fr> wrote:
We'll do this one first:

What are the mysterious "side effects" which are avoided by using Haskell,
which
everyone talks about? Null pointers?

Side effects are usually things like mutable state. In Haskell variables
don't vary. "x=x+1" isn't valid in Haskell. This means, among other things,
that functions always do the same thing given the same input (they can't
depend on some mutable state changing value), which is great since you'll
never get those "oh I forgot that I must first call foo before I call bar,
or I'll get an error". This really is a HUGE win, since programming with
state is unreasonably error-prone. I'm afraid it's next to impossible to
convince anyone that this is true, unless they're willing to give it a
serious try, though :-)

Null pointers are possible when you're dealing with C functions mostly. You
don't use pointers in Haskell normally, only when you're interfacing with
external C libraries etc.

Hello,

> what are the advantages of haskell over semi-functional programming
> languages
> such as Perl, Common Lisp, etc.?

For me? Purity. I mean you can get plenty of the benefits of FP in any old
language (witness C# 3.0), but the one thing you can never get by just
adding support for a "functional style" in another language is purity. Once
purity is gone, it's gone! It can't be retrofitted on an existing language.

Purity is great because it makes it much easier to write programs without
making silly mistakes. When writing programs in languages with lots of side
effects you have to sort of keep a "mental log" in your head for all
possible execution paths ("in this branch x is equal to y plus w, and this
pointer here is null in the other branch x is null and..."). For me I can
quite literally *feel* "brain resources" being freed up when using Haskell,
which I can use to get stuff done quicker (or probably more accurate: I can
feel how much brainpower I waste on book keeping and keeping track of this
"mental log" when using languages like C++).

Also purity is very interesting when you want to paralellize programs (a
pure function can be executed on any thread, at any time, and its guaranteed
to never interfer with the computation of other functions -- in impure
languages this doesn't hold at all!). This is probably the killer app for
functional programming IMO. FP is cool for a number of reasons, but I think
"isn't almost unusable in a multithreaded setting" is what sets it apart the
most from imperative languages.

Haskell also has STM which is great for that low level shared state
concurrency that you sometimes need (no locks, monitors, or any of that
non-composable, insanity-inducing, messiness!)

> Aren't Haskell's advantages outweighed by its complexity (Monads, etc.)
> and
> rigidity?

I can sometimes feel that Haskell looses out on not being user friendly in
the Java sense (i.e. "cut out any feature that can't be understood in five
minutes by a chimp"). Some things do take some effort to learn, but there is
a huge payoff for it (it's really powerful!). But yeah, there might be
plenty of folks who will never bother learning about them, and they won't
understand your code.

--
Sebastian Sylvan
+44(0)7857-300802
UIN: 44640862

_______________________________________________
Haskell mailing list
Hask...@haskell.org
http://www.haskell.org/mailman/listinfo/haskell


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Rob Hoelz  
View profile  
 More options Apr 26 2007, 2:22 pm
Newsgroups: fa.haskell
From: Rob Hoelz <ho...@wisc.edu>
Date: Thu, 26 Apr 2007 18:22:08 UTC
Local: Thurs, Apr 26 2007 2:22 pm
Subject: Re: [Haskell] Newbie: what are the advantages of Haskell?

There are plenty of advantages to Haskell; but it doesn't mean that
it's the only language I use now.  I read an article about Perl vs.
Python once, and the point that stuck with me most was "The Perl motto
is TMTOWTDI, and Python's just another WTDI."  The same applies to
Haskell, or any other language for that matter.  I love Haskell; my
code is usually bug-free (or close) the first time I run it because of
its features like having no side effects.  But I still use Perl for
system administration, and I'm developing a window manager in Scheme
now because of its features.

As far as Haskell's disadvantages, I don't see monads as a
disadvantage; most descriptions of them are complicated, but there are
plenty of good tutorials out there.  Rigidity is a double edged sword;
it helps keep your code working, but it does make you jump through some
hoops to get certain things working.

-Rob Hoelz
_______________________________________________
Haskell mailing list
Hask...@haskell.org
http://www.haskell.org/mailman/listinfo/haskell


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
mike clemow  
View profile  
 More options Apr 26 2007, 2:26 pm
Newsgroups: fa.haskell
From: "mike clemow" <gelfm...@gmail.com>
Date: Thu, 26 Apr 2007 18:26:21 UTC
Local: Thurs, Apr 26 2007 2:26 pm
Subject: Re: [Haskell] Newbie: what are the advantages of Haskell?
Phiroc,

I'm new to these ideas too--especially since my college math training
is non-existent.  I found the following wikipedia articles
particularly illuminating on the topic of side-effects:

http://en.wikipedia.org/wiki/Side_effect_%28computer_science%29

and

http://en.wikipedia.org/wiki/Referential_transparency

FP is a completely different way of thinking about solving a problem
than is generally used in imperative programming.  It's a lot more
like math (see Alonso Church, Lambda Calculus, and Haskell Curry,
after which Haskell is named and the process called "Currying," ->
another great wikipedia read:  http://en.wikipedia.org/wiki/Currying
where some of the real power of FP comes from).

The main advantage to solving the problems in this way is that you can
be more sure (like mathematical proof kind of sure) that your program
does what it's intended to do.

As far as language vs language discussion, I say get a book, or look
on the net for a tutorial (try haskell.org for starters) and try it
out and see if it works for you.  That's what I'm doing.    It's fun!
But, use the right tool for the job, of course, as Rob pointed out.

Cheers,
Mike (FP Ultra-Noob)

On 4/26/07, Sebastian Sylvan <sebastian.syl...@gmail.com> wrote:

--
http://clembie.livejournal.com
http://shadowofaculture.blogspot.com
http://deadlylittlepills.com
_______________________________________________
Haskell mailing list
Hask...@haskell.org
http://www.haskell.org/mailman/listinfo/haskell

    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Taillefer, Troy (EXP)  
View profile  
 More options Apr 26 2007, 2:45 pm
Newsgroups: fa.haskell
From: "Taillefer, Troy (EXP)" <troy.taille...@lmco.com>
Date: Thu, 26 Apr 2007 18:45:32 UTC
Local: Thurs, Apr 26 2007 2:45 pm
Subject: RE: [Haskell] Newbie: what are the advantages of Haskell?
Phiroc,

Hi Welcome to the mailing list.

Problem with partially functional languages in my opinion is if you can
do things the way that your most use i.e. imperative programming you
will do it

Perl, Python, Lisp, Scheme and etc have features that support functional
programming but I would wager that you will find more imperative code
written in those languages then you would functional code. People tend
to do things in the way there most accustom too and most developers are
educated in and work in imperative languages so if you really want to do
FP then your better to stick to a language that doesn't support other
more familiar paradigms otherwise you will find yourself falling back on
more comfortable and familiar ways of doing things.

Side effects include I/O, mutable assignment (destructively writing to
memory), generating random numbers etc.
Haskell of course has to allow these things otherwise it could not
produce useful programs it just does a lot better job of isolating these
side effects from Code
that does not have these side effects which have many benefits first
most being the ability to compose/glue code together in all sorts of
neat ways and not having to worry about unintentional side effects.

Advantage of Haskell over most other languages would be the core
language itself and its ability to glue software components together in
a safe way. This
advantage doesn't come without some pain and learning curve though.

Haskell is also a great language to learn new ideas and ways of thinking
about building software this is my interest in this language at this
time.

Haskell is a good place to start if you are looking to write something
from scratch
Unfortunately this is not my case.

Disadvantages of Haskell are unfortunately greater then its advantages
as beautiful a programming language as Haskell is it lacks Libraries ( A
great glue language without many components to glue together is a sad
irony) and Tooling

Haskell is not a language to get stuff done quickly in. I will probably
use Monads in a real world project in VB.NET 9 before Haskell.

I am not a Perl fan but CPAN is very cool when I have had to do
something in Perl I could find what I need there and it was well
documented too.

Haskell to me is the promise of a dream yet unrealized in which you
easily glue together components together and it just works maybe one day
these components will actually get written.

Troy


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Keith Fahlgren  
View profile  
 More options Apr 26 2007, 5:48 pm
Newsgroups: fa.haskell
From: Keith Fahlgren <ke...@oreilly.com>
Date: Thu, 26 Apr 2007 21:48:28 UTC
Local: Thurs, Apr 26 2007 5:48 pm
Subject: Re: [Haskell] Newbie: what are the advantages of Haskell?
On 4/26/07 10:13 AM, Joe Thornber wrote:

> On 26/04/07, Johannes Waldmann <waldm...@imn.htwk-leipzig.de> wrote:
>> phi...@free.fr wrote:

>> > [...] semi-functional programming languages such as Perl [...]

>> now this is an interesting view ...

> I seem to remember someone writing a book on functional programming in
> Perl, which seemed odd to me.

For the record, you're probably thinking of Higher-Order Perl, by Mark Jason
Dominus.

HTH,
Keith

http://www.amazon.com/Higher-Order-Perl-Transforming-Programs/dp/1558...
_______________________________________________
Haskell mailing list
Hask...@haskell.org
http://www.haskell.org/mailman/listinfo/haskell


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Arne Dehli Halvorsen  
View profile  
(1 user)  More options Apr 27 2007, 5:07 am
Newsgroups: fa.haskell
From: Arne Dehli Halvorsen <arne....@online.no>
Date: Fri, 27 Apr 2007 11:07:54 +0200
Local: Fri, Apr 27 2007 5:07 am
Subject: Re: [Haskell] Newbie: what are the advantages of Haskell?
Sebastian Sylvan wrote:
> (note to Haskellers: Yeah, I'm handwaving things here, no need to point out
> counter-examples to my generalisations!)

> On 4/26/07, phi...@free.fr <phi...@free.fr> wrote:
(snip)

> Null pointers are possible when you're dealing with C functions mostly. You
> don't use pointers in Haskell normally, only when you're interfacing with
> external C libraries etc.

Having recently moved into Haskell myself, I'd like to elaborate a
little regarding null pointers.
Actual null pointers are, as Sylvan states, only an issue when
interfacing or working at a low level.

I think the other kind of null pointers are more important.
If you call a method
  MyObject getObjectFromStrings(String s1, String st)
in java, you may have to check both your strings - they may be null, and
subsequent logic may call string methods on them, which would raise an
exception.
Also, the method may return null, and you may have to handle this with
an if-statement.
  MyObject theObject = getObjectFromStrings(first, second);
  if (theObject != null) {useObject(myObject);}

In Haskell, you would have a function
  getObjectFromStrings::String->String->MyObject

This can not be called with any other types than strings - the type
system will not allow it. If you need to express the idea of maybe
receiving a worthless value, you need to use the type Maybe, like this:

getObjectFromStrings::Maybe String->Maybe String->Maybe MyObject

and you would use pattern matching to implement the two possibilities of
a Maybe: Nothing and Just value.
getObjectFromStrings Nothing Nothing = Nothing
getObjectFromStrings (Just firstString) (Just otherString) = (Just (
MyObject { f= firstString.....

For most programming, the obligatory checking of possible null values
just disappears.

Arne


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Discussion subject changed to "OT MJD and HOP (was Newbie: what are the advantages of Haskell?)" by Al Falloon
Al Falloon  
View profile  
 More options Apr 27 2007, 8:50 am
Newsgroups: fa.haskell
From: Al Falloon <afall...@synopsys.com>
Date: Fri, 27 Apr 2007 12:50:32 UTC
Local: Fri, Apr 27 2007 8:50 am
Subject: [Haskell] OT MJD and HOP (was Newbie: what are the advantages of Haskell?)

Keith Fahlgren wrote:
> On 4/26/07 10:13 AM, Joe Thornber wrote:
>> On 26/04/07, Johannes Waldmann <waldm...@imn.htwk-leipzig.de> wrote:
>>> phi...@free.fr wrote:

>>>> [...] semi-functional programming languages such as Perl [...]
>>> now this is an interesting view ...
>> I seem to remember someone writing a book on functional programming in
>> Perl, which seemed odd to me.

> For the record, you're probably thinking of Higher-Order Perl, by Mark Jason
> Dominus.

> http://www.amazon.com/Higher-Order-Perl-Transforming-Programs/dp/1558...

Mark Dominus has a blog that people on this list might enjoy
http://blog.plover.com/

He writes a lot about math and programming, which are favorite topics on
  this list.

_______________________________________________
Haskell mailing list
Hask...@haskell.org
http://www.haskell.org/mailman/listinfo/haskell


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Discussion subject changed to "Newbie: what are the advantages of Haskell?" by Taillefer, Troy (EXP)
Taillefer, Troy (EXP)  
View profile  
 More options Apr 27 2007, 9:49 am
Newsgroups: fa.haskell
From: "Taillefer, Troy (EXP)" <troy.taille...@lmco.com>
Date: Fri, 27 Apr 2007 13:49:32 UTC
Local: Fri, Apr 27 2007 9:49 am
Subject: RE: [Haskell] Newbie: what are the advantages of Haskell?

Java sense (i.e. "cut out any feature that can't be understood in five
minutes by a chimp")

Got to love comments like this they are constructive, objective, mature
and accurate.

Glad we have your expert opinion to give us the gospel.

Can I get an amen? How about a Hallelujah ?

Troy Taillefer Java chimpanzee

________________________________

From: haskell-boun...@haskell.org [mailto:haskell-boun...@haskell.org]
On Behalf Of Sebastian Sylvan
Sent: Thursday, April 26, 2007 1:27 PM
To: phi...@free.fr
Cc: hask...@haskell.org
Subject: Re: [Haskell] Newbie: what are the advantages of Haskell?

(note to Haskellers: Yeah, I'm handwaving things here, no need to point
out counter-examples to my generalisations!)

On 4/26/07, phi...@free.fr <phi...@free.fr> wrote:
We'll do this one first:

What are the mysterious "side effects" which are avoided by using
Haskell, which
everyone talks about? Null pointers?

Side effects are usually things like mutable state. In Haskell variables
don't vary. "x=x+1" isn't valid in Haskell. This means, among other
things, that functions always do the same thing given the same input
(they can't depend on some mutable state changing value), which is great
since you'll never get those "oh I forgot that I must first call foo
before I call bar, or I'll get an error". This really is a HUGE win,
since programming with state is unreasonably error-prone. I'm afraid
it's next to impossible to convince anyone that this is true, unless
they're willing to give it a serious try, though :-)

Null pointers are possible when you're dealing with C functions mostly.
You don't use pointers in Haskell normally, only when you're interfacing
with external C libraries etc.

        Hello,

        what are the advantages of haskell over semi-functional
programming languages
        such as Perl, Common Lisp, etc.?

For me? Purity. I mean you can get plenty of the benefits of FP in any
old language (witness C# 3.0), but the one thing you can never get by
just adding support for a "functional style" in another language is
purity. Once purity is gone, it's gone! It can't be retrofitted on an
existing language.

Purity is great because it makes it much easier to write programs
without making silly mistakes. When writing programs in languages with
lots of side effects you have to sort of keep a "mental log" in your
head for all possible execution paths ("in this branch x is equal to y
plus w, and this pointer here is null in the other branch x is null
and..."). For me I can quite literally *feel* "brain resources" being
freed up when using Haskell, which I can use to get stuff done quicker
(or probably more accurate: I can feel how much brainpower I waste on
book keeping and keeping track of this "mental log" when using languages
like C++).

Also purity is very interesting when you want to paralellize programs (a
pure function can be executed on any thread, at any time, and its
guaranteed to never interfer with the computation of other functions --
in impure languages this doesn't hold at all!). This is probably the
killer app for functional programming IMO. FP is cool for a number of
reasons, but I think "isn't almost unusable in a multithreaded setting"
is what sets it apart the most from imperative languages.

Haskell also has STM which is great for that low level shared state
concurrency that you sometimes need (no locks, monitors, or any of that
non-composable, insanity-inducing, messiness!)

        Aren't Haskell's advantages outweighed by its complexity
(Monads, etc.) and
        rigidity?

I can sometimes feel that Haskell looses out on not being user friendly
in the Java sense (i.e. "cut out any feature that can't be understood in
five minutes by a chimp"). Some things do take some effort to learn, but
there is a huge payoff for it (it's really powerful!). But yeah, there
might be plenty of folks who will never bother learning about them, and
they won't understand your code.

--
Sebastian Sylvan
+44(0)7857-300802
UIN: 44640862

_______________________________________________
Haskell mailing list
Hask...@haskell.org
http://www.haskell.org/mailman/listinfo/haskell


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Al Falloon  
View profile  
 More options Apr 27 2007, 12:19 pm
Newsgroups: fa.haskell
From: Al Falloon <afall...@synopsys.com>
Date: Fri, 27 Apr 2007 16:19:22 UTC
Local: Fri, Apr 27 2007 12:19 pm
Subject: [Haskell] Re: Newbie: what are the advantages of Haskell?

Taillefer, Troy (EXP) wrote:
> Java sense (i.e. "cut out any feature that can't be understood in five
> minutes by a chimp")

> Got to love comments like this they are constructive, objective, mature
> and accurate.

> Glad we have your expert opinion to give us the gospel.

> Can I get an amen? How about a Hallelujah ?

Admittedly, this is phrased in an inflammatory manner, however, the
original sentiment is actually pointing out an advantage of Java over
Haskell. Here is the original paragraph in context:

Sebastian Sylvan wrote:
> I can sometimes feel that Haskell looses out on not being user friendly
> in the Java sense (i.e. "cut out any feature that can't be understood in
> five minutes by a chimp"). Some things do take some effort to learn, but
> there is a huge payoff for it (it's really powerful!). But yeah, there
> might be plenty of folks who will never bother learning about them, and
> they won't understand your code.

IOW: Java's advanced features are separable from its basic features.
I.e. you can teach Java without teaching generics or anonymous inner
classes. In Haskell, OTOH, you can't even learn how to do IO without
learning Monads, or at least glossing over oddities like a new syntax.
And thats not even getting into issues like statelessness and lazy
evaluation.

So for a new user, Java is the better language. You can get into its
features slowly and as you see the need for them. Haskell requires you
to learn a number of mind-bending concepts right up front. Java has a
gentle learning curve and Haskell has a vertical jump.

But, Sebastian is right. The leap is worth it. Its the same as what
someone once said about LISP: even if you never get to use Haskell
regularly, you will be a better programmer when you finally "get it".

_______________________________________________
Haskell mailing list
Hask...@haskell.org
http://www.haskell.org/mailman/listinfo/haskell


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Wolfgang Jeltsch  
View profile  
 More options Apr 27 2007, 1:30 pm
Newsgroups: fa.haskell
From: Wolfgang Jeltsch <g9ks1...@acme.softbase.org>
Date: Fri, 27 Apr 2007 17:30:02 UTC
Local: Fri, Apr 27 2007 1:30 pm
Subject: Re: [Haskell] Re: Newbie: what are the advantages of Haskell?
Am Freitag, 27. April 2007 18:18 schrieb Al Falloon:

> […]
> IOW: Java's advanced features are separable from its basic features.
> I.e. you can teach Java without teaching generics or anonymous inner
> classes. In Haskell, OTOH, you can't even learn how to do IO without
> learning Monads, or at least glossing over oddities like a new syntax.
> And thats not even getting into issues like statelessness and lazy
> evaluation.

As for Java, this is not quite true.  In Java, you cannot write a “Hello
world!” program without stumbling over classes and static methods.  And if
you start using I/O, you will soon have to deal with rather complex class and
object structures.  (At least this used to be the case.)

> […]

Best wishes,
Wolfgang
_______________________________________________
Haskell mailing list
Hask...@haskell.org
http://www.haskell.org/mailman/listinfo/haskell

    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Johannes Waldmann  
View profile  
 More options Apr 27 2007, 2:38 pm
Newsgroups: fa.haskell
From: Johannes Waldmann <waldm...@imn.htwk-leipzig.de>
Date: Fri, 27 Apr 2007 18:38:02 UTC
Local: Fri, Apr 27 2007 2:38 pm
Subject: Re: [Haskell] Re: Newbie: what are the advantages of Haskell?

 > I.e. you can teach Java without teaching generics or anonymous inner
classes.

but you shouldn't -

if you can teach the type-correct use of arrays (it's done for decades),
then you can teach generic collections (at least their proper usage),

and what's the problem with the anonymous class in
x.addActionListener(new ActionListener(){ void actionPerformed(..){..}});

back to the original question (see subject): one advantage that gets
easily overlooked
is lazy evaluation, leading to better modularization, because you can
decouple
object (stream) generation from transformation from consumption,
and still be space efficient. with eager evaluation this would require
jumping through many hoops,
destroying the logical structure of the program.
and once  you're lazy, then it's mandatory to be pure.

Cf. one of the classical (1984!) answers to the "advantages" question:
John Hughes: why functional programming matters,
http://www.math.chalmers.se/~rjmh/Papers/whyfp.html

Best regards, J.W.

_______________________________________________
Haskell mailing list
Hask...@haskell.org
http://www.haskell.org/mailman/listinfo/haskell


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Taillefer, Troy (EXP)  
View profile  
 More options Apr 27 2007, 3:55 pm
Newsgroups: fa.haskell
From: "Taillefer, Troy (EXP)" <troy.taille...@lmco.com>
Date: Fri, 27 Apr 2007 19:55:28 UTC
Local: Fri, Apr 27 2007 3:55 pm
Subject: RE: [Haskell] Re: Newbie: what are the advantages of Haskell?
>Admittedly, this is phrased in an inflammatory manner, however, the

original sentiment >>is actually pointing out an advantage of Java over
Haskell. Here is the original >>>.paragraph in context:

This not the first inflammatory comment he has made

>>But, Sebastian is right.

Sebastian will be right when I see Chimpanzees coding in Java :)

>> The leap is worth it.

I am not so sure it was for me.
I guess It depends on what you are looking for I have spent the last
year learning Haskell and I have learned some very interesting concepts.
I can't help but wish that Haskell turned out to be a more practical
language for me to code something useful in every time I looked for
Haskell libraries I was a disappointed.
I can't help feeling that last year might have been better
spent learning Erlang (which is this years language for me to learn).

I really enjoy Functional programming (at least until I try to do
something serious then frustration sets in). I can't produce software in
a timely and cost effective fashion without a large body of high
quality, documented and maintained libraries.

I get the feeling that Haskell is for researchers to explore ideas about
programming in but no one is interested in doing The grind work of
cranking out useful basic libraries.
I guess you need borrow some of those Java Chimps :).

Am I the only person on the list that feels this way ?

I guess I am feeling a bit bitter of spending so much time on Haskell
and having so little to show for it.

Troy


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
mike clemow  
View profile  
 More options Apr 27 2007, 4:16 pm
Newsgroups: fa.haskell
From: "mike clemow" <gelfm...@gmail.com>
Date: Fri, 27 Apr 2007 20:16:07 UTC
Local: Fri, Apr 27 2007 4:16 pm
Subject: Re: [Haskell] Re: Newbie: what are the advantages of Haskell?
Troy,

As a Java chimp embarking on the Haskell journey myself, I'd be
interested in hearing about specific ways that learning Haskell has
changed the way you program Java.  How do you employ the "very
interesting concepts" that you have learned through your study of
Haskell in your Java programming?  Do you employ them at all?  _Can_
they be employed in Java?  Has it made you a better Java programmer?

Cheers,
Mike

On 4/27/07, Taillefer, Troy (EXP) <troy.taille...@lmco.com> wrote:

--
http://clembie.livejournal.com
http://shadowofaculture.blogspot.com
http://deadlylittlepills.com
_______________________________________________
Haskell mailing list
Hask...@haskell.org
http://www.haskell.org/mailman/listinfo/haskell

    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Tony Morris  
View profile  
 More options Apr 27 2007, 4:39 pm
Newsgroups: fa.haskell
From: Tony Morris <tmor...@tmorris.net>
Date: Fri, 27 Apr 2007 20:39:20 UTC
Local: Fri, Apr 27 2007 4:39 pm
Subject: Re: [Haskell] Re: Newbie: what are the advantages of Haskell?

mike clemow wrote:
> Troy,

> As a Java chimp embarking on the Haskell journey myself, I'd be
> interested in hearing about specific ways that learning Haskell has
> changed the way you program Java.  How do you employ the "very
> interesting concepts" that you have learned through your study of
> Haskell in your Java programming?  Do you employ them at all?  _Can_
> they be employed in Java?  Has it made you a better Java programmer?

> Cheers,
> Mike

I reinvented functional programming when I was using Java rather than
Haskell making me use Java more succintly. I knew something was
seriously wrong with imperative programming and Java's type system all
those years I spent working on the implementation for IBM. I was pleased
to learn that Haskell incorporated many of my ideas (and more) -
validating my original suspicions. The fact that many of the concepts in
Haskell I had already "invented" made the language easy for me to learn
(as in, "oh yeah of course that makes perfect sense" in response to
discover monads).

I produced many Java projects in an attempt to demonstrate what I
thought was wrong, but few of them remain due to loss of interest.

http://jtiger.org/
http://code.google.com/p/pure-functional-java/

In regard to the original question, 'What are the mysterious "side
effects" which are avoided by using Haskell, which everyone talks about?
Null pointers?', my response is "yes".

Looking at a NullPointerException (NPE), these exist because of the
imperative nature of the code; with explicit order of evaluation and
potential side-effects. In an attempt to highlight the absurdity of the
fact that a NPE even exists, I like to tell people that "NPEs occur when
you write a program that says, 'give me the something that is not there
yet'". Now, if you have read Stephen Hawking's Brief History of Time and
the chapter titled, Arrow of Time, you will know that "the arrow of time
will not reverse". How absurd it is to suggest otherwise by imperative
programmers! Simply, a programming language that allows an expression of
"give me the non-existent something" contains a logical absurdity.

let p(something) = something exists
let q(something) = something is non-existent
let r = p ? ¬q
let s = p ? q
therefore r
therefore s
but r ? ¬s !!

I have long considered (well before I knew about Haskell) formulating a
more concrete proof that imperative programming contains many logical
absurdities.

Remember, forall software. software is based on the lambda calculus. I
believe that you can prove this.

Tony Morris
http://tmorris.net/

_______________________________________________
Haskell mailing list
Hask...@haskell.org
http://www.haskell.org/mailman/listinfo/haskell


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Derek Elkins  
View profile  
 More options Apr 27 2007, 5:08 pm
Newsgroups: fa.haskell
From: Derek Elkins <derek.a.elk...@gmail.com>
Date: Fri, 27 Apr 2007 21:08:29 UTC
Local: Fri, Apr 27 2007 5:08 pm
Subject: Re: [Haskell] Re: Newbie: what are the advantages of Haskell?

[cut]

And then you come to Haskell and you -can- say, "Give me the something that is
not there yet."

_______________________________________________
Haskell mailing list
Hask...@haskell.org
http://www.haskell.org/mailman/listinfo/haskell


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Taillefer, Troy (EXP)  
View profile  
 More options Apr 27 2007, 5:51 pm
Newsgroups: fa.haskell
From: "Taillefer, Troy (EXP)" <troy.taille...@lmco.com>
Date: Fri, 27 Apr 2007 21:51:09 UTC
Local: Fri, Apr 27 2007 5:51 pm
Subject: [Haskell] Re: Newbie: what are the advantages of Haskell?

Mike,

It has affected my Java/C/C++ programming a lot.

1. I am much more careful how I combine ( inherit, compose, aggregate )
code because of potential side affects

2. It has helped to find certain types of bugs in Java code more easily
that come up because of subtle effects introduced by combining code
together

3. It has helped me to write code that is more composable

4. Haskell has increased my awareness of how important type safety is So
I use Java Generics more now to enforce more type safety  when I can
(sometimes I am stuck deploying to java 1.4) (I also use C++ templates
to do the same thing for C++) But these are often feel like hacks

Haskell's type system is a thing of pure beauty haven't seen anything
quite like it in any other PL (ML and OCAML are as close as I have seen
but still fall short) and Generics and Templates really can't compare

You really want the compiler to help you out as much it can. Have it
tell you when you are doing something that you shouldn't be doing.

By the way Mike thanks you just totally cheered me up I guess I just
needed to sit back and think about what I have learned and how valuable
it is to me.

Troy


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Albert Y. C. Lai  
View profile  
 More options Apr 27 2007, 6:17 pm
Newsgroups: fa.haskell
From: "Albert Y. C. Lai" <tre...@vex.net>
Date: Fri, 27 Apr 2007 22:17:21 UTC
Local: Fri, Apr 27 2007 6:17 pm
Subject: Re: [Haskell] Re: Newbie: what are the advantages of Haskell?

Derek Elkins wrote:
> And then you come to Haskell and you -can- say, "Give me the something
> that is not there yet."

Please give me the libraries that are not there yet!  *duck*

_______________________________________________
Haskell mailing list
Hask...@haskell.org
http://www.haskell.org/mailman/listinfo/haskell


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Derek Elkins  
View profile  
 More options Apr 27 2007, 6:34 pm
Newsgroups: fa.haskell
From: Derek Elkins <derek.a.elk...@gmail.com>
Date: Fri, 27 Apr 2007 22:34:33 UTC
Local: Fri, Apr 27 2007 6:34 pm
Subject: Re: [Haskell] Re: Newbie: what are the advantages of Haskell?
Albert Y. C. Lai wrote:

> Derek Elkins wrote:
>> And then you come to Haskell and you -can- say, "Give me the something
>> that is not there yet."

> Please give me the libraries that are not there yet!  *duck*

We wait for people to need the libraries, then a large amount of delayed work is
forced.
_______________________________________________
Haskell mailing list
Hask...@haskell.org
http://www.haskell.org/mailman/listinfo/haskell

    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Johan Henriksson  
View profile  
 More options Apr 27 2007, 6:37 pm
Newsgroups: fa.haskell
From: Johan Henriksson <maho...@areta.org>
Date: Fri, 27 Apr 2007 22:37:06 UTC
Local: Fri, Apr 27 2007 6:37 pm
Subject: Re: [Haskell] Re: Newbie: what are the advantages of Haskell?
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

however, you cannot even print a message without learning a few things
about classes. C++ is even worse in this aspect though, using both
classes and operator overloading for a hello world. I think the haskell
first learning step is quite acceptable if you manage to get the syntax
right (beginners tend to mess up indentation rules for do etc)

> So for a new user, Java is the better language. You can get into its
> features slowly and as you see the need for them. Haskell requires you
> to learn a number of mind-bending concepts right up front. Java has a
> gentle learning curve and Haskell has a vertical jump.

> But, Sebastian is right. The leap is worth it. Its the same as what
> someone once said about LISP: even if you never get to use Haskell
> regularly, you will be a better programmer when you finally "get it".

> _______________________________________________
> Haskell mailing list
> Hask...@haskell.org
> http://www.haskell.org/mailman/listinfo/haskell

- --
- --
- ------------------------------------------------
Johan Henriksson aka Mahogny aka Stålis
maho...@areta.org / jo...@student.chalmers.se /
johan.henriks...@biosci.ki.se
MSc Engineering
PhD student, Karolinska Institutet
http://www.areta.org
http://www.mtek.chalmers.se/~johen/
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.3 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFGMnr9TMgAX9vPlc4RAhqNAJ9lKF+nlEvLJ/vWcQcOSitV1ffnLwCfYl5T
tpNKzvDIN+S7XW3ifAl5Ik8=
=UvYY
-----END PGP SIGNATURE-----
_______________________________________________
Haskell mailing list
Hask...@haskell.org
http://www.haskell.org/mailman/listinfo/haskell


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Michael T. Richter  
View profile  
 More options Apr 28 2007, 2:36 am
Newsgroups: fa.haskell
From: "Michael T. Richter" <ttmrich...@gmail.com>
Date: Sat, 28 Apr 2007 06:36:44 UTC
Local: Sat, Apr 28 2007 2:36 am
Subject: RE: [Haskell] Re: Newbie: what are the advantages of Haskell?

On Fri, 2007-27-04 at 15:37 -0400, Taillefer, Troy (EXP) wrote:
> I really enjoy Functional programming (at least until I try to do
> something serious then frustration sets in). I can't produce software in
> a timely and cost effective fashion without a large body of high
> quality, documented and maintained libraries.

> I get the feeling that Haskell is for researchers to explore ideas about
> programming in but no one is interested in doing The grind work of
> cranking out useful basic libraries.
> I guess you need borrow some of those Java Chimps :).

> Am I the only person on the list that feels this way ?

No.  You're not.  I wish I knew the language better so I could start
working on those libraries.  I love the language, but can't use it.

--
Michael T. Richter <ttmrich...@gmail.com> (GoogleTalk:
ttmrich...@gmail.com)
Never, ever, ever let systems-level engineers do human interaction
design unless they have displayed a proven secondary talent in that
area. Their opinion of what represents good human-computer interaction
tends to be a bit off-track. (Bruce Tognazzini)

  signature.asc
< 1K Download

_______________________________________________
Haskell mailing list
Hask...@haskell.org
http://www.haskell.org/mailman/listinfo/haskell


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Donald Bruce Stewart  
View profile  
 More options Apr 28 2007, 2:43 am
Newsgroups: fa.haskell
From: d...@cse.unsw.edu.au (Donald Bruce Stewart)
Date: Sat, 28 Apr 2007 06:43:04 UTC
Local: Sat, Apr 28 2007 2:43 am
Subject: Re: [Haskell] Re: Newbie: what are the advantages of Haskell?
ttmrichter:

>    On Fri, 2007-27-04 at 15:37 -0400, Taillefer, Troy (EXP)
>    wrote:

> I really enjoy Functional programming (at least until I try to do
> something serious then frustration sets in). I can't produce software
> in a timely and cost effective fashion without a large body of high
> quality, documented and maintained libraries.

> I get the feeling that Haskell is for researchers to explore ideas ab
> out programming in but no one is interested in doing The grind work of
> cranking out useful basic libraries.  I guess you need borrow some of
> those Java Chimps :).

> Am I the only person on the list that feels this way ?

This is why we have:

    * hackage.haskell.org, a centralised library repository, with
      documentation and src. note that around 15 new libs are appearing
      each week!

    * librar...@haskell.org, for discussing improvements and extensions

    * haskell.org/cabal, to ease building new libraries

Feel free to help out!

-- Don

_______________________________________________
Haskell mailing list
Hask...@haskell.org
http://www.haskell.org/mailman/listinfo/haskell


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Messages 1 - 25 of 36   Newer >
« Back to Discussions « Newer topic     Older topic »

Create a group - Google Groups - Google Home - Terms of Service - Privacy Policy
©2009 Google