7 ms·
Has anyone else just read this and realised they need to go off an learn some form of functional programming? I ignored it for such a long time because I felt i
by chuhnk 16y ago
Has anyone else just read this and realised they need to go off an learn some form of functional programming? I ignored it for such a long time because I felt it wasn't relevant to my current situation but I was wrong. You gain some incredible fundamental knowledge that you would otherwise be completely oblivious to.
Is lisp really the way to go though?
- yesbabyyes 16y agoTry javascript and/or coffeescript. Valuable skills!
- macmac 16y agoYes
- JonnieCache 16y agoI hear lisp is pretty sweet. Haskell as well, there's a lot going on there. You can program in a very functional style in ruby or javascript if you want something with a more active community, its just that the resources you find on those languages won't be so targeted at FP, because its not their defining feature.
- merijnv 16y agoI would recommend Haskell over Lisp, because Haskell will force you to do functional programming, where-as Lisp is less rigid in that regard. In addition the #haskell IRC channel on FreeNode is filled with people who have infinite patience with Haskell newbies and it has an excellent introductory text at http://learnyouahaskell.com/ http://learnyouahaskell.com/ About two years ago I decided to learn Haskell. Had about 4 false starts and didn't "get" it until my 5th attempt, at which point I figured out what the type system meant and had a bit of a Matrix "I know kung fu!"-moment. Two years of hanging around in #haskell later, I know a billion more things about programming/programming languages and learned type theory (although I still don't grok all conversations there :p). Some other comments on the usefulness of Haskell: http://news.ycombinator.com/item?id=1145743 http://news.ycombinator.com/item?id=1145743 http://news.ycombinator.com/item?id=1145743 http://news.ycombinator.com/item?id=1145743
- silentbicycle 16y agoYou may also have luck learning FP with Erlang. It's also functional, but approaches it from a different direction, focusing on reliability and concurrency rather than types and purity. Between Haskell and Erlang, one of them will probably fit your mind better. I started FP with OCaml, but OCaml makes it too easy to continue writing imperative code when you're actively trying to learn new idioms.
- merijnv 16y agoI agree Erlang is also very interesting. I think some of the features looks absolutely fascinating (hot updatable code!), etc. I just haven't found the the time to learn it yet. I wish Erlang's syntax was more like Haskell, though :\
- Peaker 16y agoYour two links are identical..
- merijnv 16y agoMy bad the other one was supposed to be http://news.ycombinator.com/item?id=2322920 http://news.ycombinator.com/item?id=2322920 Bit of a copy and paste fail...
- mike_esspe 16y agoYou can try Scala (especially if you know Java).
- chuhnk 16y agoI initially tried scala when getting back to using a language on the jvm. While scala boasts less verbosity than java I felt like the syntax became more complex than what I was accustomed to and slowed my progress if you can believe that. Java was the first real OO language I learned and then moved onto ruby. Currently working with C. I think in pursuing functional programming I'll probably go with something pure like haskell, ML, or lisp.
- bluehavana 16y agoLearn Scheme in 20 minutes, because it's that simple: http://www.youtube.com/watch?v=GAHA0nJv8EA http://www.youtube.com/watch?v=GAHA0nJv8EA
- troels 16y agoJavascript is just as good for learning the concept of functional programming. It's often (jokingly) called Scheme with C-like syntax. Unlike lisps though, it doesn't give you macros, which is even more mind-bogling than first-class functions. Ruby also has decent fp-semantics, but they are not as clearly cut as in Javascript.
- gaius 16y agoI would recommend OCaml over Lisp, once you've had type inference, there's no going back.