For personal projects or for learning the principles of FP, there is nothing wrong with using Haskell.<p>From personal experience however, I will not be using Haskell again for a larger professional project, because our team ran into too many time consuming issues and problems that have been solved successfully in other languages/environments (especially the JVM) like dependency management or reasoning over runtime characteristics before deploying the application on production systems. Especially memory consumption is very hard to predict.<p>Of course, the language also has its benefits and even after some years it tickles your brain just the right way.<p>I like programming in Haskell very much, but in real world projects (you know - when you work in a team not only consisting of PhDs) I prefer Scala or Java, because getting a war file deployed or profiling an application is just so much easier.<p>YMMV, of course.
I've invested a lot of time in trying to learn Haskell properly.<p>On one hand, it's incredibly rewarding when a completely new and strange concept finally 'clicks', then you write a few lines to test your understanding and it just works.<p>On the other hand, it's frustrating to realize that there are still a lot of concepts you don't fully grasp, several libs that are still out of your reach, yet another completely new way of structuring your code that you are yet to unravel. Essentially, that you are (I am) still a newbie.<p>All in all, I find Scala better suited to learning FP and applying your newly-acquired knowledge to develop mildly useful apps, as quick results usually lead to more motivation. Just IMHO.<p>(Not to mention there are many libs that aren't yet up to par with their JVM counterparts, but that's another can of worms.)
I learned F# as this guy learned Scala. I too dived into Haskell after a while and learnt a lot of new things.<p>Having learned some great functional tips, I came back to my regular C#/Ruby and applying LINQ and Ruby's blocks seemed more natural to me. However, monads, monoids, functors still don't matter when you switch over.<p>I've used Yesod to write a small app. A typical form in Yesod (for model binding) has this signature:<p>newPostForm :: Html -> MForm Blog Blog (FormResult (Text,Text,Text), Widget)<p>Even after learning Yesod for a while, I wasn't able to completely reason with that signature. Why bother with all the name of the application, sub site, formresult, widget when all you want is just three simple form fields? Rails gives it to you in params[:form]. It's just too easy in Rails with a lot of gems lying around for every task you decide to do. And when you're stuck, you're just a google away from getting your answer.<p>So my question is: after learning Haskell, do you intend to stick to it? Did I make a wise decision in ditching Haskell?
I can respect and applaud the man for wanting to learn, When I picked up scala I had the same experience he did. When I went to solve a problem I immediately fell back to the imperative style of programming since that's how my brain has worked for a decade. It has taken real time and effort to _try_ and solve problems in a functional manner. Turns out that's a really good and elegant solution for some problems and a skill that's worth developing. If another language makes that training easier then by all means use it. One of the real benefits of scala is you can be useful in it ( just solving the problem ) while you have all the tooling necessary to make those elegant solutions when you have the requisite skill set to implement them. It would be handy if scalac has a setting like -Werror in C land where non-functional constructs would be flagged in the codebase.
If anyone wants an introduction to functional programming using Scala, I really recommend Martin Odersky's coursera course (<a href="https://class.coursera.org/progfun-2012-001/class" rel="nofollow">https://class.coursera.org/progfun-2012-001/class</a>). He restricts you to functional Scala; there isn't a mutated variable in the whole course. It isn't officially a course right now. You won't get a certificate for taking it, and I don't think the grader is turned on, but the other materials are still there.<p>In my mind, the really mind altering thing was seeing not just that Object Oriented and Functional programming styles could be compatible, but that they were in many ways complementary. Good OO design, particularly the idea of small single responsibility classes, is kind of enforced by functional style. If you need to pass around fifty variables just to increment a counter, you'd go crazy. So writing functionally forces you to figure out ways to split things up.
Similarly, its easy to convert well small, single responsibility OO objects into functional ones, and just a nightmare otherwise.<p>I was just blown away at how much a course on functional programming helped me to understand OO design.
My own approach to learning FP has been "Hello Haskell", "Hello Scala", "Hello ML", "Hello Clojure", "Hello Rust",...<p>I don't know why you say goodbye, I say hello.
I enjoyed the read, but I borked at your suggestion that not being purely functional, and the language barking at you if you break that convention stops you learning functional programming.<p>Take most Lisps (I'll assume scheme, because it's what I'm most familiar with), which give you more than enough side-effecty rope to hang yourself with should you so desire- but you won't get far unless you're coding functionally.
Anybody here has developed and deployed a Scala-based or/and Haskell-based project for production? I mean systems for business purpose where rubber meets the road with timeline to hit and budget to meet. Far too often the stories are shared by people who learned a new language for 3 months and implemented a pet system where only a few real users. Definitely I respect their zeal and curiosity, but I am more interested to know what the veterans are thinking
Yeah I've tried learning Scala for a year.<p>It was painful, real painful and I felt like I didn't learn much from it.<p>Now I'm learning Erlang and I'm applying what I've learned from Scala to Erlang and wow. I'm glad I took at stab at Scala. Erlang is wonderful btw, it's so simple there are some minor drawback like no string primitive... I also love the fact that there is no loop, it forces me to think recursively. I guess because it's so simple I can just focus on learning the functional part instead of other stuff such as new objects paradigm (traits, etc..), design pattern ("pimp my whatever"), and type. I'm guess once I'm done with this I'll focus on type, thinking Haskell...
While i liked his gumption, I personally thought god i don't want to do that.. I have been playing around haskell on and off, in my free time, and have come to a conclusion that while it's a fun and cool language to play around, it may not be useful(as in career) hobby. It might be categorized as pure fun language learning.
Haskel/Scala has Learn You a Haskell/Scala for Great Good! and Lisp has The Land of Lisp.<p>Are there any _why-esque guides to Clojure and FP in general like these other languages have? I'm unaware of any and consider it surprising given the Clojure communities passion.
I find it unconvincing. That Haskell deemed is better for learning functional programming for the sake of learning functional programming does not really say much about general usefulness.
<i>>For christmas I bought myself a copy of Learn You A Haskell For Great Good by Miran Lipovača. Apart from being a great Haskell learning resource, it’s one of the best programming books I have ever read.</i><p>I second that. Miran is a superb technical writer. He also annotates the book with little excerpts from all my favorite movies.