Haskell looks very interesting but I can't help but ask 'why do I need it?'. Currently I am learning Java since I want to get a jr.developer job later on and Ruby for some scripting and personal projects(maybe even Rails later). So Java is used in industry, Ruby is used in web and metasploit/ronin (something that I like to mess with), but what about Haskell? I am genuinely curious what Haskell can offer. I always see…
You don't need it. If you are a Junior developer (or aiming at being one) Haskell is a language you most definitely don't need. Now, once you have your feet wet, it's worth learning. Here's why: - Pure(mostly) functional language. This is in opposition to Java & Ruby, which while having functional aspects are OO (Object Oriented). - It's okay not to know what a functional language is. It's making functions first-clas…
Learn You a Haskell for Great Good
21–30 of 67 posts
Re: Learn You a Haskell for Great Good
#22Haskell looks very interesting but I can't help but ask 'why do I need it?'. Currently I am learning Java since I want to get a jr.developer job later on and Ruby for some scripting and personal projects(maybe even Rails later). So Java is used in industry, Ruby is used in web and metasploit/ronin (something that I like to mess with), but what about Haskell? I am genuinely curious what Haskell can offer. I always see…
The first is the more common: learning these languages exposes you to other ways of programming, which in turn makes you a better programmer no matter what language you're programming in. This is unquestionably true. Mainstream languages are constantly learning new things from these languages, which means you will be able to apply the techniques you learn from them to your code no matter what language you write in. I have the misfortune[1] of writing a lot of PHP at my day job, but it turns out even PHP has support for filter and map over arrays. If I hadn't learned functional programming, I would never have even looked for them.
The other argument, which is made less often, is that you can actually write great software in these languages. This argument is made less often because we can obviously look at the market and the TIOBE index and see that Haskell is way down at #30 with 0.323% of the market share. However, there are really great programs made in Haskell (xmonad, for one). There are also tons of great programs made in Lisps, especially Clojure of late. So, this second argument is not entirely a dead end either.
Revisiting something I mentioned in the first argument for a moment though, I would actually make a third argument that I rarely see. As I said, other languages are constantly learning new things from these languages. Haskell's community is full of PhDs studying at the intersection of programming and mathematics, and they are discovering the things that will revolutionize programming in the future. Haskell, for example, has been exploring strong static typing with algebraic datatypes[2], Hindley-Milner type inference, and typeclasses to support higher-kinded polymorphism[3]. Those concepts are turning out to be incredibly powerful, and you will inevitably see them in other programming languages in the future. We've seen this before with Lisp (garbage collection, recursion, first-class functions), and there's no reason not to expect the trend to continue.
So, why learn Haskell? It's the easiest way to see what tools you'll have available to you in industry 20 years from now when the other languages catch up.
[1]: http://me.veekun.com/blog/2012/04/09/php-a-fractal-of-bad-de...
Re: Learn You a Haskell for Great Good
#23This is an amazing book. I highly recommend it as the first Haskell book you read. After it, you can check out Real World Haskell. To elaborate on why you shouldn't read (at least the online version of) Real World Haskell first: It has a lot of important topics that it covers that LYAH does not cover (like how to use cabal their package manager). But, it's not as good of a tutorial on the language and functional prog…
Re: Learn You a Haskell for Great Good
#24Haskell looks very interesting but I can't help but ask 'why do I need it?'. Currently I am learning Java since I want to get a jr.developer job later on and Ruby for some scripting and personal projects(maybe even Rails later). So Java is used in industry, Ruby is used in web and metasploit/ronin (something that I like to mess with), but what about Haskell? I am genuinely curious what Haskell can offer. I always see…
http://learnyousomeerlang.com/
Which is a fantastic book, clearly written as a labor of love.
Erlang doesn't have Haskell's type system and doesn't seem to be of much interest for CS research types, but it's awesome for developing certain kinds of system.
I am curious about Haskell myself, and don't tend to need a lot of excuses to learn a language, but I don't perceive a "sweet spot" for it just yet, as in "I could go build X, and Haskell would be a great fit for it". Given how many smart people use it, I'm sure there are a lot of applications for it, but I also get a feeling that there's not one thing that really stands out.
Re: Learn You a Haskell for Great Good
#25Haskell looks very interesting but I can't help but ask 'why do I need it?'. Currently I am learning Java since I want to get a jr.developer job later on and Ruby for some scripting and personal projects(maybe even Rails later). So Java is used in industry, Ruby is used in web and metasploit/ronin (something that I like to mess with), but what about Haskell? I am genuinely curious what Haskell can offer. I always see…
> I always see it mentioned on Reddit but I have yet to come across any notable project written with it. xmonad, one of the best tiling window managers for Linux, is written in Haskell (and is open source).
...and BSD
Re: Learn You a Haskell for Great Good
#26Re: Learn You a Haskell for Great Good
#27Haskell looks very interesting but I can't help but ask 'why do I need it?'. Currently I am learning Java since I want to get a jr.developer job later on and Ruby for some scripting and personal projects(maybe even Rails later). So Java is used in industry, Ruby is used in web and metasploit/ronin (something that I like to mess with), but what about Haskell? I am genuinely curious what Haskell can offer. I always see…
From the perspective of "learn other languages to broaden your horizons": Haskell is worth learning because it has an expressive, strong, static type system. Most other languages do not have that property (Java's type system is static, give or take null, and strong, but not expressive, and Ruby's is strong but neither expressive nor static). The Haskell type system lets you have conversations with the compiler about…
By the way, does Haskell's type system have the "value restriction" that you run into in ML?
Re: Learn You a Haskell for Great Good
#28Re: Learn You a Haskell for Great Good
#29OK so let's recap, you create a new type with `data`, which is formed of a type constructor that starts with the keyword `data` and a data constructor which doesn't start with `data`. To create aliases you use `type` and `newtype` and to create type classes you use `class`.
Now how do you call the type class of things that can be mapped over? Surely that must be something like `mappable`?
Re: Learn You a Haskell for Great Good
#30Haskell looks very interesting but I can't help but ask 'why do I need it?'. Currently I am learning Java since I want to get a jr.developer job later on and Ruby for some scripting and personal projects(maybe even Rails later). So Java is used in industry, Ruby is used in web and metasploit/ronin (something that I like to mess with), but what about Haskell? I am genuinely curious what Haskell can offer. I always see…
You don't need it. If you are a Junior developer (or aiming at being one) Haskell is a language you most definitely don't need. Now, once you have your feet wet, it's worth learning. Here's why: - Pure(mostly) functional language. This is in opposition to Java & Ruby, which while having functional aspects are OO (Object Oriented). - It's okay not to know what a functional language is. It's making functions first-clas…
Ideally, these components are composable and reusable, both to facilitate reasoning about the code and code reuse. The Haskell Standard Prelude is a fantastic example of this working out well.
Basically, it's based on the idea that the functions which are easiest to reason about are those with one well-defined input and one well-defined output which is completely determined by that input. You can't always have this, but functional languages attempt to get you as close as possible. The simplicity of pipeline-style programming is one of the happy little dividends of this kind of thinking.