functional programming

Functional error handling in Scala

Because functional programming is like algebra, there are no null values or exceptions. But of course you can still have exceptions when you try to access servers that are down or files that are missing, so what can you do? This lesson demonstrates the techniques of functional error handling in Scala.

Functional Programming in Scala for Beginners

I see some crazy/weird critics in the world. I’ll skip the details, but yes, Functional Programming, Simplified is for beginners who are new to functional programming (FP). I wrote it because I thought many other current FP books were too hard to read, and I wasted a lot of my own time with those poorly-written resources. (Frankly, when I see that something is poorly written it makes me think that the author either doesn’t care about his readers, or doesn’t understand the subject well enough to explain it well.)

I guess I could have named my book Functional Programming in Scala for Beginners, but the key thing for me is that if you want more people to learn FP — which should be a positive thing — you need to break it down into smaller components, as I have done. The book isn’t perfect, and I hope the next edition is better, but it seems to be helping a lot of people, so I’m happy about that.

Functional programming leads to happiness

As I wrote in Functional Programming, Simplified, functional programming can lead to happiness (and sanity). The quotes in this slide from Rúnar Bjarnason’s FP talk expand on what I wrote in my book. They keys are that pure functions are very simple, and you don’t have to constantly worry about the mutable state in your application.

I’m surprised when functional programmers say bad things about Scala

I’m surprised when many functional programmers feel the need to say something bad about Scala. As a community, that makes them seem like a bunch of people who aren’t very nice. There are things I don’t like about Haskell, F#, Lisp, Scala, Kotlin, Go, Perl, PHP, Python, C, C++, etc., but I don’t feel the need to take pot shots at any languages or individuals.