OSDev.org

The Place to Start for Operating System Developers
It is currently Fri Jul 19, 2019 1:56 am

All times are UTC - 6 hours




Post new topic Reply to topic  [ 4 posts ] 
Author Message
 Post subject: Haskell & Functional Programming
PostPosted: Fri Aug 07, 2015 8:45 am 
Offline

Joined: Tue Jan 13, 2015 4:55 pm
Posts: 3
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-4.2.0.1/docs/Data-Maybe.html).

EDIT:
While I was thinking of Haskell in general when posting this, guess the question should extend to functional programming in general...


Top
 Profile  
 
 Post subject: Re: Haskell & Functional Programming
PostPosted: Fri Aug 07, 2015 11:06 am 
Offline
Member
Member
User avatar

Joined: Mon Jun 05, 2006 11:00 pm
Posts: 1999
Location: USA (and Australia)
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. (1 2)


Top
 Profile  
 
 Post subject: Re: Haskell & Functional Programming
PostPosted: Sat Aug 08, 2015 5:53 am 
Offline
Member
Member
User avatar

Joined: Wed Oct 18, 2006 3:45 am
Posts: 9284
Location: On the balcony, watching the Swedish Chef
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.

_________________
"Certainly avoid yourself. He is a newbie and might not realize it. You'll hate his code deeply a few years down the road." - Sortie
[ My OS ] [ VDisk/SFS ]


Top
 Profile  
 
 Post subject: Re: Haskell & Functional Programming
PostPosted: Sat Aug 08, 2015 7:42 am 
Offline
Member
Member

Joined: Sat Mar 15, 2014 3:49 pm
Posts: 96
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).


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 4 posts ] 

All times are UTC - 6 hours


Who is online

Users browsing this forum: No registered users and 2 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group