Full disclosure: I didn’t fully embrace this book, I didn’t do the exercises at the end of each chapter. For most of the languages, I don’t even have them installed on my computer. Ok, It feels good to admit that. With that disclosed, I will say Seven Languages In Seven Weeks was a treat. Of the 7 languages in this book, Ruby, Io, Prolog, Scala, Clojure, Erlang, and Haskell, I had only used 2 of them in the past, Ruby and Scala. My background is mostly in object-oriented, procedural and prototypical languages, however, this book shifts its focus towards languages that are more functional, and are built with pattern matching and concurrency in mind. Concepts that are not focuses of the languages I’ve worked with in the past other than Scala.
Seeing the evolution of languages was insightful to me, how closely tied to Lisp Closure is or how Scala and Erlang’s pattern matching are inspired by Prolog. While first investigating Scala, I could see the implementation of pattern matching but it wasn’t clear how powerful it could be until I saw how Erlang and Prolog leverage it in this book. While I’ve appreciated limiting state in the systems I build, it was made much more clear how functional programming can be leveraged to supercharge concurrency. Working with languages like Java and Go, concurrency can be a proceed with caution situation because the developers writing the code are worried about race conditions and side effects. When we can significantly limit race conditions and mutable state then concurrency is less scary.
The interviews with the authors of each language spoke volumes about what the tradeoffs and intentions of each language were. Ruby is a language where the trade-offs are most obvious, a great syntax which leads to productivity traded for speed. Having revisited Ruby recently for other projects both personal and for work, you can see the productivity increase right away but, it might take some time to feel that trade off in speed. The challenge, of course, is knowing when to migrate.
What I discovered at the end of reading this book was the language I wanted to explore next. Oddly enough, it wasn’t in this book and even more strange after doing some more reading it was partially inspired BY this book and that language is Elixir. Elixir combines some of the syntactical sugar we love about Ruby, the metaprogramming of Clojure and the concurrency and power of Erlang.