For personal projects or for learning the principles of FP, there is nothing wrong with using Haskell. 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 cha…
Interestingly, despite their respective reputations Haskell is by far more popular than Scala: http://www.langpop.com/
Hello Haskell, Goodbye Scala
41–50 of 118 posts
Re: Hello Haskell, Goodbye Scala
#42If anyone wants an introduction to functional programming using Scala, I really recommend Martin Odersky's coursera course ( https://class.coursera.org/progfun-2012-001/class ). 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 ar…
That course does not allow registration right now.
Re: Hello Haskell, Goodbye Scala
#43Re: Hello Haskell, Goodbye Scala
#44Anybody 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…
Re: Hello Haskell, Goodbye Scala
#45If anyone wants an introduction to functional programming using Scala, I really recommend Martin Odersky's coursera course ( https://class.coursera.org/progfun-2012-001/class ). 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 ar…
From what I've seen, I think Scala is a nice language. One thing I don't like is particularly that it's a bit kitchen-sink-ish: there's a whole lot of syntax and semantics to learn, seemingly due to the OO side of the language. By comparison Haskell is quite simple. All the higher-level constructs are implemented in plain Haskell, so you can easily understand them but thanks to a flexible, uniform syntax, using them doesn't feel clunky.
To me the main reason for not learning FP through Scala, however, is that the community isn't organized around teaching FP in the same way that Haskell is. It sounds like this course is an exception. But otherwise, I found that trying to learn about Monads from the scalaz documentation was not satisfying, and we all know that "A Monad is a Sheep with Curly Hair" blog posts are a dime a dozen (in Haskell and Scala). Learn You a Haskell made the concepts, and also their benefits, clear to me for the first time. Now I'm working through Real World Haskell to build my chops and reinforce my understanding.
While trying out both languages and picking which one to learn, I came across an interesting post on Gilad Bracha's blog which had a lively discussion including a comment by the [claimed] original author of Scalaz [1], which made it clear to me that it would be easier to start in Haskell and move to Scala than vice versa. I think I (and the OP) are both seeking to gain a strong foundation in FP concepts. To summarize, in my experience most Scala resources on the internet (blog posts that come up, etc.) aren't quite as good in this regard; at this point a lot of the Scala programmers using these techniques are probably Haskell programmers anyway.
That being said, the internet is a huge place. If there's a Scala equivalent of this post [2] please do share it! I agree with other posters here that Scala has quickly gained a significant amount of industrial acceptance. I'd imagine that I'm more likely to write Scala professionally in my lifetime than Haskell. But I also believe I'll be better off approaching it having learned the FP concepts in Haskell first.
[1] http://gbracha.blogspot.com/2011/01/maybe-monads-might-not-m...
[2] http://stackoverflow.com/questions/1012573/getting-started-w...
Re: Hello Haskell, Goodbye Scala
#46I 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. 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.
Purity, IMO, is over-rated. You can write pure FP code in C++, Java, or CL if you wanted to. It doesn't matter whether you can write imperative code with side-effects and doesn't make those languages any less useful. This purity thing that the Haskell-zealots are on about just stinks of bullish*t and it's not good for you.
That being said, Haskell does do some neat things and there is a lot to learn from it. It's type-inference lets it do some neat things like parallel maps and so forth. It also shows us that laziness is not always a good default. I'm not hating on Haskell but anyone who drools over its, "purity," is not saying much at all. Purity is not an attribute that wins you any battles.
Re: Hello Haskell, Goodbye Scala
#47Earlier quoted context omitted.
I guess it depends in what context you're looking at it. What makes Java so successful is its simplicity. You can get fairly quickly up to speed on it, and you can have junior coders on it producing code quickly without shooting themselves in the foot too much or spending a couple of hours trying to find out how to update a tree efficiently. On the other hand, as a hobbyist, it's absolutely fantastic.
In the case of Java, the simplicity of language leads to complexity of programs. The extra difficult-to-learn parts of Haskell makes for programs that are more practical, shorter and easier to work with. There's a trade-off between simplicity and power - and we don't really want to maximize simplicity only. And if we did, Java would not be a good candidate either.
I gather this is not a design goal of a language with "avoid success at all costs" as an unofficial motto
Re: Hello Haskell, Goodbye Scala
#48I 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. 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.
Sometimes you need side-effects. The world is far from pure. I think Common Lisp gives you exactly the tools you need and gets out of your way. Dynamic variables (a very specific term in CL) are simply awesome . You need side-effects when you're dealing with I/O -- sockets, files, shells, etc. I prefer languages that make it as painless as possible when I need it. Purity, IMO, is over-rated. You can write pure FP cod…
I may be wrong but I think the name is rather common outside CL too (assuming you refer to "variables with dynamic scope rather than lexical"). E.g. as we are talking of scala
http://www.scala-lang.org/api/current/scala/util/DynamicVari...
Re: Hello Haskell, Goodbye Scala
#49Earlier quoted context omitted.
>When did you use Haskell? Roughly two years ago. >I think the silliness about PhD's is very very silly. Of course it is. I just wanted to make a point that the "average programmer" has probably never seen a single line of ML-syntax before. >About profiling -- I have never profiled a Scala/Java application, but how much easier is it compared with: "cabal configure --enable executable-profiling", and then running the…
Two years ago the situation was far worse, dependency-hell-wise. About hooking up the process for some profiling information, take a look at: http://ocharles.org.uk/blog/posts/2012-12-11-24-day-of-hacka...
Your propagandizing is either based on very insulated anecdote or you're being disingenuous for the sake of promoting your favorite language.
The salesmanship does not help Haskell and sets expectations poorly. Fix ghc-pkg and cabal!
Clojure and Go make this look ridiculous and unnecessary.
N.B. Been using Haskell off and on for 3 years. Never once has it not been a pain.
Re: Hello Haskell, Goodbye Scala
#50I've invested a lot of time in trying to learn Haskell properly. 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. 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…
One of the things I like about Haskell is that there's never scarcity of new concepts to learn: Functors, Applicatives, Monoids, Monads, Monad transformers, Comonads, Arrows, Lenses, Foldables, Iteratees... And every one of these has a world in itself!
Yeah, a real productivity booster. It's like batteries included but with C4 attached to every battery.
Sometimes, people have work to do.