Sam Ruby writes...
The “secret sauce” is pattern matching. Things like “if these conditions are met, this code fires, with the following variables set”. With Erlang, this metaphor is everywhere. Function calls are an exercise in pattern matching. Database queries are an exercise in pattern matching. Message passing is... oh, you get the idea.I would suggest pattern matching is 1/3 of the secret sauce. The other two parts being...
- Implicit mailbox per process with pattern-based rather than solely chronological reception.
- Fail fast without failure coding. Function and case patterns and guards define the *success* cases. Failures to match by default result in failing the process.
No comments:
Post a Comment