OTP is more than just a framework it is really an important part of the language itself. Parts of OTP like proc_lib are built right into the VM among other close ties. This is why we focus our ErlangCamps 70% on OTP constructs and we wrote the book "Erlang and OTP in Action" and not just an Erlang book. We believe that an Erlang book would really only be describing half the language. When I say Erlang what I really mean is Erlang/OTP.
Hello all, the simplest answer for why we did not include the gen_fsm is that it is not used very often. In 11 years of Erlang programming I have only used it a handful of times. You can easily replicate it's behaviour with the gen_server in any case. Furthermore explaining it's use clearly turned out to be complicated. Rather than confuse readers, and add pages to an already lengthy book, we decided to skip it. If you clearly understand gen_server, superviser, application, and gen_event you will be able to pick up gen_fsm when you need to. If we do a second edition perhaps we can include the FSM as an appendix.
The gen_fsm implementation is elegant and I do recommend taking a look at it but you probably won't find yourself using it all too often. At the end of the day we wanted to write a book that prepared people for real world Erlang situations and the gen_fsm does not weigh heavily in those scenarios.
You are right on target. OTP should be the norm and should be learned as a first step. Later on for curiosities sake one can learn to program without it! OTP codifies many of the best practices that experts in this type of process based concurrency model use every day.
It is nice to be finished with the book and we are really proud of it. These days we are back to Erlware, resurrecting the project from a two year hibernation, and also planning for the next ErlangCamp.
It was a very good talk. When you read the blog entry realize it was live blogged and that is why the English is the way it is - my fingers can only move so fast.