Thursday, October 22, 2009

Armstrong Thesis (Chapter 4)

For the last class, we read chapter 2 of Joe Armstrong's thesis. Today we will be discussing chapter 4. (Note: Chapter 3 which was skipped was all about the Erlang language syntax ... I skimmed it over, but after reading Chapter 4 it is obvious that I really need to go back and read Chapter 3 in more detail)

In Chapter 4, Joe introduces us to a couple of concepts. Specifically, the chapter discusses some high level concepts for programming with Erlang such as keeping concurrent and sequential code as separate processes, the overall ideology behind error handling and the concept of letting a process die on error while another process monitors for errors (workers/supervisors).

The chapter wraps up with a brief discussion on intentional programming. I thought this discussion, albeit brief, was interesting. The general concept is that your code should be easily understood and one of the examples given was about a lookup method which could be used in three different contexts, depending on the developer's intent. Armstrong points out that a better approach would be to make this three separate methods. That way it is clear what was meant by the calling function. I think there is definitely some merit to this approach and I really don't think it is specific to Erlang.

As time permits, I would like to write a program using Erlang. I like the ideas we've seen so far and find it interesting. Any ideas for a good project to get started?

No comments:

Post a Comment