Sign in to follow this  

Usefulness of Haskell?

This topic is 3723 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Does anyone, outside of a university setting, ever use Haskell? I'm learning it as part of a class here at college, and I'm curious whether it will ever be useful to me once I finish the class. Maybe I'm wrong, but it appears to me that I can have the same functionality with Python, without the assignment hamstringing.

Share this post


Link to post
Share on other sites
Quote:
Original post by Megaman_22
Maybe I'm wrong, but it appears to me that I can have the same functionality with Python, without the assignment hamstringing.

What you call "the assignment hamstringing" is really just one aspect of a pure-functional language. As to whether it will be useful to you, that depends on whether you understand its power and how to leverage it. You seem to be falling afoul of The Blub Paradox.

Share this post


Link to post
Share on other sites
If you define language through syntax, then no, it'll most likely not be useful.

But if you can apply what you have learned about the domain of functional languages, then you'll likely encounter the concepts in real world as well.

Share this post


Link to post
Share on other sites
Nobody really uses Haskell in "the real world", but learning to program and thinking in a functional style is very useful. This is something you can apply in most languages. For example C++ standard library has many functional influences (check out <functional> and <algorithm>).

Share this post


Link to post
Share on other sites
I use Haskell all the time, but I'm moving towards F# just for the better .NET interop.

All of my assignments past my second year of university, unless otherwise mandated, ended up being done in it. It's mostly because I finished a semi-large 8,000+ line compiler assignment, successfully compiled the whole thing for the first time, tested it and it worked on the first go. I handed it in ten minutes before the deadline, shocked as all hell.

I know Pouya uses F# exclusively for all of his home projects, and I use Haskell for all of my tools (C++ for the game stuff -- HSDL is just too weird to use reasonably on OS X).

However, using Haskell (or any other functional language, really) makes you a better programmer by exposing you to concepts and strategies you might not otherwise have encountered. I use recursion way more often now than I did before my second year.

Share this post


Link to post
Share on other sites
Quote:
Original post by Ravuya
All of my assignments past my second year of university, unless otherwise mandated, ended up being done in it.


I used SML quite a lot during my university studies (our first course on programming was on SML actually). Its a nice language and very elegant for writing things like compilers. Out of the functional languages I'v tried I liked Erlang the most. Very nice and very pragmatic language. I never got around to trying haskell despite planning to do so a while ago.

Share this post


Link to post
Share on other sites
Haskell is the best language I've used by a very long margin in my opinion. I use Haskell exclusively for my projects, one of which is a compiler (no surprise), but another is a web application. Whether it is suitable for writing a high performance game engine is another matter, I'd probably use F# for that.

Share this post


Link to post
Share on other sites
Quote:
Whether it is suitable for writing a high performance game engine is another matter, I'd probably use F# for that.


Out of curiosity, what makes haskell implementations slow? (if they are)

Share this post


Link to post
Share on other sites
Quote:
Original post by rollo
Quote:
Whether it is suitable for writing a high performance game engine is another matter, I'd probably use F# for that.


Out of curiosity, what makes haskell implementations slow? (if they are)
Lazy evaluation is more difficult to implement efficiently than strict evaluation. GHC isn't too slow though, it's a lot more efficient than Python for example. The shootout gives a rough idea. Clean, another lazy language, is only beaten by C, C++, D and Pascal in those rankings.

Share this post


Link to post
Share on other sites

This topic is 3723 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this