Erlang Central

Category:Common Idioms

Revision as of 01:03, 5 September 2006 by Bfulgham (Talk | contribs)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

Introduction

A coding idiom is a solution to a commonly occurring programming problem. In a sense all recipes are idioms, but we use the term here for those recipes that apply to many different tasks. In Erlang many patterns, such as object oriented programming, become idioms as we can express these patterns directly in code using functions and macros.

A seminal work in Object Oriented Programming is the so-called "Gang of Four" book, Design Patterns: Elements of Reusable Object-Oriented Software. In the late 1990's, Peter Norvig argued that 16 of the 23 patterns in the Design Patterns book are simplified or eliminated in dynamic languages, such as Lisp or Erlang.

Hopefully, with the aid of the recipes in this section, you will soon be building robust, efficient, and understandable modules in Erlang.

General Concepts

Erlang programs are typically structured and built quite differently than many other languages. The major differences can be summarized in a few bullet points, which I here link to important papers exploring these ideas in more depth.

  • Let It Fail -- The design of reliable systems, considering that the language implementations and runtimes are typically incorrect themselves, requires a new way of approaching software design.
  • Think In Parallel -- Model the natural parts of a problem as independent, communicating processes.

Pages in category ‘Common Idioms’

The following 4 pages are in this category, out of 4 total.