Epilogue. What next?

Congratulations on taking up the challenge of learning FP and making it to the end of the book! You’re now familiar with all the fundamental concepts of FP as well as several advanced techniques. I hope that you’ve enjoyed the book, and I encourage you to share your impressions through a review, social media, or just by talking with colleagues. By way of goodbye, I want to give you some suggestions on where to look next if you’d like to take your exploration of FP further.

Firstly, I invite you to watch my talk on Logic vs. side effects, given at NDC Sydney 2017. In it, I outline a summary on how to tame side effects using different techniques, including free monads, the most radical approach to separating logic from side effects. It’s available here: https://youtu.be/wJq86IXkFdQ.

Your next step would probably be to learn a functional language (or a few). C# is a multiparadigm language, so you can mix and match as you like. A functional language, on the other hand, forces you to use the functional approach throughout, for example, by not allowing any state mutation at all. You’ll also find that functional languages have better syntactic support for the techniques presented in this book. An additional benefit of learning a functional language is that it allows you to take advantage of other learning resources: books, blogs, talks, and so on.

Most learning material on FP available today has code samples in Haskell or Scala. The natural choice would be to learn Haskell, which is the functional language of reference and a lingua franca among functional programmers. For this, I recommend you read Learn You a Haskell for Great Good by Miran Lipovaca (No Starch Press, 2011).1 Another good way to learn Haskell is to do so while following Erik Meijer’s online course on FP.2

Scala is a multiparadigm language with an emphasis on FP that runs on the Java virtual machine. The Scala community is active in addressing the question of how the ideas of FP, which tend to originate in academia, can best be put to work in industry. If you want to learn Scala, I recommend you do so by following Martin Odersky’s online courses.3

Two younger functional languages I’m fond of are Elm and Elixir, both of which are supported by an enthusiastic user community and are gaining popularity, especially among startups. I hope to see these two languages gain wider adoption and recognition in the next few years.

Elm (http://elm-lang.org/) is a strongly typed, purely functional client-side language that compiles to JavaScript. The syntax is terse, similar to Haskell or F#, but the language and tooling are much more user-friendly. It includes a framework that takes care of managing state and performing side effects. As a result, the programmer only writes pure functions. Simply put, Elm puts any existing JavaScript framework to shame. If you’re a full-stack web developer, consider using Elm for the frontend.

Elixir (http://elixir-lang.org/) is a dynamically typed language that runs on the Erlang virtual machine, which is based on the actor model discussed in chapter 15, and as such, it’s particularly well suited if your interest is in systems with a high degree of concurrency. You’ll want to further explore message-passing concurrency.

Finally, I recommend you take a look at Edwin Brady’s Type-Driven Development with Idris (Manning, 2017). Even if you only read a few chapters and never plan to write a program in Idris, seeing how type driven development works in a language that it optimized for it can stimulate you to bring some of those techniques into your coding practice.

There are many more functional and multiparadigm languages out there (sorry if I forgot to include your favorite!), each with its own appeal. But the ideas of FP that you’ve learned in this book are language-independent and will enable you to acquire a basic working knowledge of any functional language within a couple of days or weeks at most.

Goodbye.


1 You can read the full contents online for free at http://learnyouahaskell.com/ but do consider buying a copy to reward the author’s hard work.

2 Erik Meijer is, among other things, one of the main contributors to LINQ and Rx. His online course on FP is available on edX (https://www.edx.org/), and you can follow along in Haskell or one of several other languages.

3 Martin Odersky is the creator of Scala, and his online courses are available on Coursera (https://www.coursera .org/).

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.222.107.236