"I have a mind like a steel... uh... thingy." Patrick Logan's weblog.

Search This Blog


Friday, August 17, 2007

Secret Sauce

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.
I'll expand on these at some point. They are significant features not found in most popular languages, and all three combine to reinforce each other.

No comments:

Blog Archive

About Me

Portland, Oregon, United States
I'm usually writing from my favorite location on the planet, the pacific northwest of the u.s. I write for myself only and unless otherwise specified my posts here should not be taken as representing an official position of my employer. Contact me at my gee mail account, username patrickdlogan.