Are all functional languages as difficult as Haskell?

  • (2 Pages)
  • +
  • 1
  • 2

17 Replies - 7307 Views - Last Post: 01 September 2012 - 03:47 AM

#1 tonysharp  Icon User is offline

  • New D.I.C Head

Reputation: 2
  • View blog
  • Posts: 20
  • Joined: 27-March 11

Are all functional languages as difficult as Haskell?

Posted 09 February 2012 - 02:26 AM

I just spent the last month trying to learn Haskell. I made progress, but every step of the way has been hell. Are all functional programming languages like this, or are there any easier ones with less syntatic sugar and an easier layout scheme?

My apologies if I sound negative. I just spent the last 12 hours trying to get a function to work, and I'm very burned out.

Your suggestions would be greatly appreciated.
Is This A Good Question/Topic? 0
  • +

Replies To: Are all functional languages as difficult as Haskell?

#2 AdamSpeight2008  Icon User is offline

  • MrCupOfT
  • member icon


Reputation: 2263
  • View blog
  • Posts: 9,467
  • Joined: 29-May 08

Re: Are all functional languages as difficult as Haskell?

Posted 09 February 2012 - 02:40 AM

Functional Languages involve a different way of looking at, and think about the problem. Especially if you been exposed to a Procedural Language first.

Essentially they all work the same way, just with different grammar.
Functions -> Take some data, do something with it, return something.
Recursion -> Can I reuse same function, for the rest of the data.
Think how Sum and Factorial can be implemented
Lists -> Fundamental Data structure. Head and Tail
How could how count the number of letter A's in a sentence.

Haskell is very strict functional language, but very powerful.
Don't like Haskell have a look at Clojure
Was This Post Helpful? 1
  • +
  • -

#3 mostyfriedman  Icon User is offline

  • The Algorithmi
  • member icon

Reputation: 727
  • View blog
  • Posts: 4,473
  • Joined: 24-October 08

Re: Are all functional languages as difficult as Haskell?

Posted 09 February 2012 - 02:41 AM

I haven't checked out other functional languages, but yea I would say haskell needs a long time and lots of effort to be really good at. Since you've already started learning haskell, I would recommend sticking to it, it will pay off, I promise.
Was This Post Helpful? 1
  • +
  • -

#4 AdamSpeight2008  Icon User is offline

  • MrCupOfT
  • member icon


Reputation: 2263
  • View blog
  • Posts: 9,467
  • Joined: 29-May 08

Re: Are all functional languages as difficult as Haskell?

Posted 09 February 2012 - 02:45 AM

Learn Haskell in 10 minutes
Was This Post Helpful? 0
  • +
  • -

#5 Raynes  Icon User is offline

  • D.I.C Lover
  • member icon

Reputation: 611
  • View blog
  • Posts: 2,815
  • Joined: 05-January 09

Re: Are all functional languages as difficult as Haskell?

Posted 09 February 2012 - 03:43 AM

Of all of the functional programming languages out there, Haskell is the one most likely to kick your ass and then spit in your eye while you're laying on the ground.

Haskell is an excellent language and is an excellent starting functional programming language because it takes everything about functional programming and stuffs it down your throat until you enjoy it. That said, it is certainly not your own option.

If you're getting burnt out on Haskell, I suggest taking a look at some other languages. I'm a big fan of Clojure, and if you've ever used Java, you wont feel entirely out of place because Clojure is a JVM language. It is also one that is gaining quite a bit of ground in the industry (I, myself, work with Clojure for a living).

But even Clojure isn't your only choice. There are tons of functional languages around. I feel that Clojure, Haskell, Erlang, Scheme, and OCaml are all some of the best languages for learning FP and making practical use of it, in that order. There are options that are more on the mutli-paradigm side: F#, Nemerle, Scala, and OCaml. OCaml and F# are pretty balanced. However, I can't bring myself to recommend a language like Scala for learning functional programming, because it makes it way too easy to forget that FP even exists. You can skip it and jump right back to OOP, and that isn't a good thing, especially for learning fp.

So, in conclusion, don't give up. If you're feeling burnt out on Haskell, it is absolutely not your only choice. Go check out Clojure or some other language. Not all functional languages are as hard as Haskell, but I don't encourage you to just give up on it either. Go use other languages and then bring what you learn back to Haskell. You may never use Haskell for many practical things (though you certainly can), but the process of learning the language is highly rewarding.

Keep up the good work.
Was This Post Helpful? 1
  • +
  • -

#6 tonysharp  Icon User is offline

  • New D.I.C Head

Reputation: 2
  • View blog
  • Posts: 20
  • Joined: 27-March 11

Re: Are all functional languages as difficult as Haskell?

Posted 09 February 2012 - 09:56 AM

Thank you for the replies and advice.

View PostAdamSpeight2008, on 09 February 2012 - 02:40 AM, said:

Don't like Haskell have a look at Clojure

Will do. Thank you.

View PostAdamSpeight2008, on 09 February 2012 - 02:45 AM, said:


I've been to that page many times. That tutorial, along with most Haskell tutorials, gives very little detail on how to structure a working program.

It would be great if there were more Haskell tutorials like this (cplusplus.com) with clear examples that could help me get started on a program without having to know the entire language first. Haskell feels like the kind of language that can't be used unless you read a couple of 500 page books first, and this makes me very mad. :censored:

View PostRaynes, on 09 February 2012 - 03:43 AM, said:

Of all of the functional programming languages out there, Haskell is the one most likely to kick your ass and then spit in your eye while you're laying on the ground.

Haskell is an excellent language and is an excellent starting functional programming language because it takes everything about functional programming and stuffs it down your throat until you enjoy it. That said, it is certainly not your own option.

:lol:

Quote

If you're getting burnt out on Haskell, I suggest taking a look at some other languages. I'm a big fan of Clojure, and if you've ever used Java, you wont feel entirely out of place because Clojure is a JVM language. It is also one that is gaining quite a bit of ground in the industry (I, myself, work with Clojure for a living).

Mmm.. Sounds like I should definitely check out Clojure then. I'll likely go back to Haskell eventually, but right now I really need to take a break from it. If I see the word "monad" again this week I might punch something.

Quote

So, in conclusion, don't give up. If you're feeling burnt out on Haskell, it is absolutely not your only choice. Go check out Clojure or some other language. Not all functional languages are as hard as Haskell, but I don't encourage you to just give up on it either. Go use other languages and then bring what you learn back to Haskell. You may never use Haskell for many practical things (though you certainly can), but the process of learning the language is highly rewarding.

Great advice. Thanks.
Was This Post Helpful? 1
  • +
  • -

#7 AdamSpeight2008  Icon User is offline

  • MrCupOfT
  • member icon


Reputation: 2263
  • View blog
  • Posts: 9,467
  • Joined: 29-May 08

Re: Are all functional languages as difficult as Haskell?

Posted 09 February 2012 - 10:05 AM

Quote

If I see the word "monad" again this week I might punch something.

tonysharp Just remember interacting with / punch something in Haskell enviroment happens in IO Monand.

Also try watching the follow Lecture series by Erik Meijer, one of the High Priest of Haskell.

C9 Lectures: Dr. Erik Meijer - Functional Programming Fundamentals, Chapter 1 of 13

This post has been edited by AdamSpeight2008: 09 February 2012 - 10:09 AM

Was This Post Helpful? 0
  • +
  • -

#8 ishkabible  Icon User is offline

  • spelling expret
  • member icon




Reputation: 1622
  • View blog
  • Posts: 5,709
  • Joined: 03-August 09

Re: Are all functional languages as difficult as Haskell?

Posted 09 February 2012 - 01:14 PM

Quote

Of all of the functional programming languages out there, Haskell is the one most likely to kick your ass and then spit in your eye while you're laying on the ground.


Strange, I found it easier to learn than common lisp; maybe I just languages like that coming from a C++ background :/ common lisp was just so un-uniform to me, required a lot more typing(for me), and was much harder to read. I might go back to it now that I'm more comfortable with Haskell, we will see.

to answer the OP's question I think I might have a few insights.

1) give up your old way of thinking. I think that might be why Haskell worked so well for me; it forced me forget C++ and Lua

2) make sure you under stand the syntax. F# really confused me at first because I didn't understand the syntax at all. I took a closer look at Haskell and that made all the difference.

3) pick something that sounds cool to you. it doesn't really matter what you pick so it might as well at least sound interesting.

This post has been edited by ishkabible: 09 February 2012 - 01:18 PM

Was This Post Helpful? 0
  • +
  • -

#9 tonysharp  Icon User is offline

  • New D.I.C Head

Reputation: 2
  • View blog
  • Posts: 20
  • Joined: 27-March 11

Re: Are all functional languages as difficult as Haskell?

Posted 09 February 2012 - 02:50 PM

View PostAdamSpeight2008, on 09 February 2012 - 10:05 AM, said:

Quote

If I see the word "monad" again this week I might punch something.

tonysharp Just remember interacting with / punch something in Haskell enviroment happens in IO Monand.

Hahaha >.<

Quote

Also try watching the follow Lecture series by Erik Meijer, one of the High Priest of Haskell.

C9 Lectures: Dr. Erik Meijer - Functional Programming Fundamentals, Chapter 1 of 13

I'll give it a look now.

I'm back on the happy path with Haskell. I got some help. I didn't know I could replace an if clause with a case statement, and then bind that case to a variable. Hopefully it'll get a little easier now. If it doesn't, there's always Clojure, and Prolog (always wanted to give that language a try).
Was This Post Helpful? 0
  • +
  • -

#10 sepp2k  Icon User is offline

  • D.I.C Lover
  • member icon

Reputation: 2113
  • View blog
  • Posts: 3,237
  • Joined: 21-June 11

Re: Are all functional languages as difficult as Haskell?

Posted 09 February 2012 - 03:52 PM

View Posttonysharp, on 09 February 2012 - 10:26 AM, said:

are there any easier ones with less syntatic sugar and an easier layout scheme?


This is perhaps a bit besides the point, but why do you feel that syntactic sugar is a bad thing? Syntactic sugar is generally designed to make the language easier for newcomers to use, not harder.
Was This Post Helpful? 0
  • +
  • -

#11 tonysharp  Icon User is offline

  • New D.I.C Head

Reputation: 2
  • View blog
  • Posts: 20
  • Joined: 27-March 11

Re: Are all functional languages as difficult as Haskell?

Posted 09 February 2012 - 04:19 PM

View Postsepp2k, on 09 February 2012 - 03:52 PM, said:

View Posttonysharp, on 09 February 2012 - 10:26 AM, said:

are there any easier ones with less syntatic sugar and an easier layout scheme?


This is perhaps a bit besides the point, but why do you feel that syntactic sugar is a bad thing? Syntactic sugar is generally designed to make the language easier for newcomers to use, not harder.

Typo. I meant more.
Was This Post Helpful? 0
  • +
  • -

#12 ishkabible  Icon User is offline

  • spelling expret
  • member icon




Reputation: 1622
  • View blog
  • Posts: 5,709
  • Joined: 03-August 09

Re: Are all functional languages as difficult as Haskell?

Posted 09 February 2012 - 04:45 PM

more syntactic sugar than Haskell? Haskell has so much syntactic sugar there is a whole compiler phase in GHC to remove it! maybe you want a more familiar syntax? have you looked at Scala?
Was This Post Helpful? 0
  • +
  • -

#13 Raynes  Icon User is offline

  • D.I.C Lover
  • member icon

Reputation: 611
  • View blog
  • Posts: 2,815
  • Joined: 05-January 09

Re: Are all functional languages as difficult as Haskell?

Posted 09 February 2012 - 04:51 PM

View Posttonysharp, on 09 February 2012 - 09:50 PM, said:

View PostAdamSpeight2008, on 09 February 2012 - 10:05 AM, said:

Quote

If I see the word "monad" again this week I might punch something.

tonysharp Just remember interacting with / punch something in Haskell enviroment happens in IO Monand.

Hahaha >.<

Quote

Also try watching the follow Lecture series by Erik Meijer, one of the High Priest of Haskell.

C9 Lectures: Dr. Erik Meijer - Functional Programming Fundamentals, Chapter 1 of 13

I'll give it a look now.

I'm back on the happy path with Haskell. I got some help. I didn't know I could replace an if clause with a case statement, and then bind that case to a variable. Hopefully it'll get a little easier now. If it doesn't, there's always Clojure, and Prolog (always wanted to give that language a try).


If you run into problems, the #haskell IRC channel on freenode is an excellent newbie friendly place to get quick one-on-one help.

Not to discredit DiC, but sometimes you're frustrated and NEED IT NOW!
Was This Post Helpful? 0
  • +
  • -

#14 tonysharp  Icon User is offline

  • New D.I.C Head

Reputation: 2
  • View blog
  • Posts: 20
  • Joined: 27-March 11

Re: Are all functional languages as difficult as Haskell?

Posted 09 February 2012 - 09:33 PM

View Postishkabible, on 09 February 2012 - 04:45 PM, said:

more syntactic sugar than Haskell? Haskell has so much syntactic sugar there is a whole compiler phase in GHC to remove it! maybe you want a more familiar syntax? have you looked at Scala?

Typo. I didn't mean syntatic sugar. I meant easer syntax.

:bananaman:

I haven't looked at Scala yet, but it's on my research list along with Clojure, Erlang, and Prolog.

View PostRaynes, on 09 February 2012 - 04:51 PM, said:

If you run into problems, the #haskell IRC channel on freenode is an excellent newbie friendly place to get quick one-on-one help.

Not to discredit DiC, but sometimes you're frustrated and NEED IT NOW!

I know, right. I was so damn mad last night. Haskell has challenged me in ways no other language has. I was able to learn C++, Python, and Javascript on my own, but with Haskell I've had to go crawling for help several times now. It's getting a little easier, but... ugh...

Thanks for the IRC.
Was This Post Helpful? 0
  • +
  • -

#15 mostyfriedman  Icon User is offline

  • The Algorithmi
  • member icon

Reputation: 727
  • View blog
  • Posts: 4,473
  • Joined: 24-October 08

Re: Are all functional languages as difficult as Haskell?

Posted 09 February 2012 - 10:36 PM

Prolog is a nice language, its a logic not functional language though. Pretty easy to learn too.
Was This Post Helpful? 0
  • +
  • -

  • (2 Pages)
  • +
  • 1
  • 2