5 ms·
Does anyone have a solid place to start with functional programming? Don't really care too much about the language it's associated with but would really like to
by crush_xc 9y ago
Does anyone have a solid place to start with functional programming? Don't really care too much about the language it's associated with but would really like to jump into learning the concepts behind it.
- BlahBoy3 9y agoI personally like this one: http://learnyouahaskell.com/chapters http://learnyouahaskell.com/chapters
- aditya42 9y agoAt it's simplest, it's just the use of pure functions[1] and nothing but pure functions. [1]: https://en.wikipedia.org/wiki/Pure_function https://en.wikipedia.org/wiki/Pure_function
- jingwen 9y agoReal World OCaml. https://realworldocaml.org/v1/en/html/prologue.html https://realworldocaml.org/v1/en/html/prologue.html > Real World OCaml is aimed at programmers who have some experience with conventional programming languages, but not specifically with statically typed functional programming. Depending on your background, many of the concepts we cover will be new, including traditional functional-programming techniques like higher-order functions and immutable data types, as well as aspects of OCaml's powerful type and module systems. It's a nice segue into the world of functional programming if you're not ready to give up on imperativeness just yet.
- chriswarbo 9y agoAfter answering this a few times I wrote up a blog post of advice for how to starting programming "more functionally", regardless of language: http://chriswarbo.net/blog/2015-01-18-learning_functional_programming.html http://chriswarbo.net/blog/2015-01-18-learning_functional_pr...
- JCoder58 9y agoScott Wlaschin's site http://fsharpforfunandprofit.com/ http://fsharpforfunandprofit.com/ - For F#, but his articles try to answer the question "why is this useful?" Eric Lippert's Monad Posts, starting at https://ericlippert.com/2013/02/21/monads-part-one/ https://ericlippert.com/2013/02/21/monads-part-one/ - Uses C# to build up Monads using examples.
- kirse 9y agoSeconding this. On a higher level also, what really helped things click for me was his "Domain Driven Design" slides... Slides: https://speakerdeck.com/swlaschin/domain-driven-design-with-the-f-number-type-system-f-number-unctional-londoners-2014 https://speakerdeck.com/swlaschin/domain-driven-design-with-... Video of talk: https://vimeo.com/97507575 https://vimeo.com/97507575
- redleggedfrog 9y agohttp://www.functionalprogramming.com/concepts.html http://www.functionalprogramming.com/concepts.html And then you go from there. The last section there is important. In the real world, your language is not always your choice, but it's perfectly possible to put functional structure in most any language.
- artimaeis 9y agoIf you come from a C# background I really enjoy the book Real World Functional Programming [1]. The way it lays out samples side by side with C# and F# is pretty great and really helped me start to understand functional programming and F#. [1] - https://msdn.microsoft.com/en-us/library/hh314518.aspx https://msdn.microsoft.com/en-us/library/hh314518.aspx
- douche 9y agoThat is a pretty excellent book, and definitely agree that it is helpful seeing the C# and F# code for the same example laid out side-by-side to compare. It helps a lot for those situations where you can't just switch to a functional-first language, but you want to use more functional constructs in your code. After all, if you try hard enough, you could code in a functional style in C.
- adamkl 9y agoI've recommended this book in the past, and I'll recommend it again. Functional Programming in Scala [1] does a good job of taking traditional stateful object oriented code and refactoring it using pure functional approaches. Coming from an OOP background, I've found it has really helped my understanding of functional programming. [1] https://www.manning.com/books/functional-programming-in-scala https://www.manning.com/books/functional-programming-in-scal...
- wincy 9y agoI started learning functional programming a few months ago. We use Elixir in production at my job and I love it. http://elixir-lang.org/learning.html http://elixir-lang.org/learning.html
- virmundi 9y agoI like Erlang. It's got an odd syntax so some of the Java/C# baggage is dropped. It's oddity makes it kinda fun in its own right. If you want to do network programming, OTP is pretty neat. http://learnyousomeerlang.com http://learnyousomeerlang.com
- hota_mazi 9y agoThe fact that Erlang is dynamically typed makes it a non starter for me.
- virmundi 9y agoI understand that. I started to make my product in Clojure. Got fairly along. Created an ArangoDB driver and migrator for it. Once I started creating the services, I keep having to go up through essentially the call stack to figure out what shape the data had at various points. I tried using a contract framework (forget its name, but I preferred it to Clojure's recent typing that doesn't type the value of a map). Now I'm back in Java. The nice thing that either language will help introduce functional ideals. I recommend Erlang since its so unique.
- tjalfi 9y agoIf you have a Pluralsight subscription, try the Applying Functional Principles in C# course [0]. [0] https://app.pluralsight.com/library/courses/csharp-applying-functional-principles/table-of-contents https://app.pluralsight.com/library/courses/csharp-applying-...
- hackermailman 9y agohttps://functionalcs.github.io/curriculum/ https://functionalcs.github.io/curriculum/ has a bunch of resources. Robert Harper's Programming in Standard ML book plus the notes from 15-150 at CMU are good for general FP concepts.
- disease 9y agohttp://www.braveclojure.com/ http://www.braveclojure.com/ For me at least, this site made programming fun again! It's colorfully written and mostly easy to follow, though some of the concepts are a bit mind blowing if you are only familiar with OOP like I was (passing a collection of functions to map really made me stop and think). Oh and it's a pretty neat way to learn emacs if you haven't already.