Was wondering if anyone here has been able to play around with http://haskell.org/ and what you all think of it - for me it is my language of choice for most of my university work & research, and it has given me a totally different view of programming and how software works, to the point that I almost feel dirty every time I use pointers in my C++ code (see http://hackage.haskell.org/package/base ... Maybe.html).
EDIT:
While I was thinking of Haskell in general when posting this, guess the question should extend to functional programming in general...
Haskell & Functional Programming
- AndrewAPrice
- Member
- Posts: 2299
- Joined: Mon Jun 05, 2006 11:00 pm
- Location: USA (and Australia)
Re: Haskell & Functional Programming
Haskell is a nice language, but in reality I only use functional languages in specific domains when I feel that the problem is best described by the flow of data, such as procedural problems and the transformation of data. I generally don't like to use it for logic/loops/implementing data structures, but maybe I'm just being biased from being more familiar and comfortable with other programming paradigms.
My OS is Perception.
- Combuster
- Member
- Posts: 9301
- Joined: Wed Oct 18, 2006 3:45 am
- Libera.chat IRC: [com]buster
- Location: On the balcony, where I can actually keep 1½m distance
- Contact:
Re: Haskell & Functional Programming
Haskell's biggest problem is that it is both a purist and an isolationist language. You can't really mix and match it with other languages in practice. Especially comparing a content-oriented language to a primarily management-oriented language that is C++ feels like having to take the atheist to mass.
Most programming tasks consists of a combination of things Haskell excels at and things Haskell sucks at. And since fixing the latter is a big problem, the net result sadly is to drop Haskell altogether, and I haven't written any Haskell in the past 6 years apart from posting the obvious examples that I once did use it.
Fortunately, time's catching up with C-based languages, and you have a growing assortment of languages that try to combine the best of both worlds. Rust and Swift come to mind here.
Most programming tasks consists of a combination of things Haskell excels at and things Haskell sucks at. And since fixing the latter is a big problem, the net result sadly is to drop Haskell altogether, and I haven't written any Haskell in the past 6 years apart from posting the obvious examples that I once did use it.
Fortunately, time's catching up with C-based languages, and you have a growing assortment of languages that try to combine the best of both worlds. Rust and Swift come to mind here.
-
- Member
- Posts: 96
- Joined: Sat Mar 15, 2014 3:49 pm
Re: Haskell & Functional Programming
Its useful to separate out Haskell from Functional Programming in general.
I use FP wherever possible, even though I am doing so in Java, Python, C, C++ and even Javascript programs.
John Carmack has an excellent article and various talks online on this http://gamasutra.com/view/news/169296/I ... g_in_C.php
(In industry, you rarely get to pick the language. If I could pick, I'd still shy away from Haskell and the Lisps and, eh, I guess Forth).
I use FP wherever possible, even though I am doing so in Java, Python, C, C++ and even Javascript programs.
John Carmack has an excellent article and various talks online on this http://gamasutra.com/view/news/169296/I ... g_in_C.php
(In industry, you rarely get to pick the language. If I could pick, I'd still shy away from Haskell and the Lisps and, eh, I guess Forth).