4 ms·
What would be a good first functional language to learn coming from an imperative/OO background?
by olalonde 15y ago
What would be a good first functional language to learn coming from an imperative/OO background?
- nickik 15y agoDepends on you you can either "jump in the deep end" or you can gratually move more to it. Gratually moving is good if you want to stay productive. (Scala, Common Lisp, dylan come to mind) Jumping in the deepend will totaly go against everything you learned but you will learn very fast. (Haskell, ML, Clojure and Scheme are probebly best here) Books: Land of Lisp/Practical Common Lisp for Commen Lisp Not sure about Scala Programming Dylan for Dylan Learn you a Haskell for Haskell Programming Clojure/Practical Clojure for Clojure Structure and Interpretation of Computer Programmes/The little Schemer for Scheme (Don't know a good book for ML)
- _delirium 15y agoI'd put ML closer to the gradual camp, though it depends strongly on where you learn it from, and partly on which flavor you choose. I see a whole lot of procedural-flavored Ocaml, and it's fairly easy (like Lisp) to mix procedural and functional styles.
- nickik 15y agoOk, I didn't know that. I have never seen a line of procedural code in ML. Thx for the info.
- olalonde 15y agoYes, the plan is to jump in the deep end, unwire my brain and apply the concepts I learn to my day to day Ruby/Javascript programming as much as possible. I think I'll go with Haskell.
- yogsototh 15y agoI am currently learning Haskell. I started by not really knowing where to start. Now I follow this advice, and until now I find it very helpful: http://stackoverflow.com/questions/1012573/how-to-learn-haskell http://stackoverflow.com/questions/1012573/how-to-learn-hask...
- arethuza 15y agoIf you are interested in the "deepend" then you could always have a look at lambda calculus and combinators: http://en.wikipedia.org/wiki/Lambda_calculus http://en.wikipedia.org/wiki/Lambda_calculus http://en.wikipedia.org/wiki/Combinatory_logic http://en.wikipedia.org/wiki/Combinatory_logic Then you get to see where the term Y Combinator came from :-)
- babel17 15y agoProbably my language Babel-17 (http://babel-17.com http://babel-17.com) if it just came down to the concepts. The Babel-17 ecosystem (input, graphics) is not in place yet, though, so for now the best language would be Standard ML .
- anon_c 15y agoStandard ML. It's simple, well-designed, stable, and consistent. http://www.itu.dk/~tofte/publ/tips.pdf http://www.itu.dk/~tofte/publ/tips.pdf http://homepages.inf.ed.ac.uk/stg/NOTES/notes.pdf http://homepages.inf.ed.ac.uk/stg/NOTES/notes.pdf A full book. It's good, but don't start with it: http://www.cs.cmu.edu/~rwh/smlbook/ http://www.cs.cmu.edu/~rwh/smlbook/
- gaius 15y agoOCaml. You can get "real work" done by dropping back to familiar imperative constructs when necessary, yet you still have an excellent functional language at your disposal. Eventually you will go more and more FP as you become more comfortable, e.g. you can use a for loop if you want, but pretty soon you'll be more comfortable with a map and it will come naturally. Or you can use an if.. else construct until you are happy with match...with. I personally treat OCaml as a type-safe Python or Tcl, you can work very productively with it.