Your SlideShare is downloading. ×
Introduction to Erlang
Upcoming SlideShare
Loading in...5
×

Thanks for flagging this SlideShare!

Oops! An error has occurred.

×
Saving this for later? Get the SlideShare app to save on your phone or tablet. Read anywhere, anytime – even offline.
Text the download link to your phone
Standard text messaging rates apply

Introduction to Erlang

10,233
views

Published on

A excerpt of my talk about Erlang and Powerset's use of it at Microsoft on 12/4/08. …

A excerpt of my talk about Erlang and Powerset's use of it at Microsoft on 12/4/08.

Please feel free to distribute, but do not modify.


0 Comments
5 Likes
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total Views
10,233
On Slideshare
0
From Embeds
0
Number of Embeds
1
Actions
Shares
0
Downloads
137
Comments
0
Likes
5
Embeds 0
No embeds

Report content
Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
No notes for slide

Transcript

  • 1. Erlang Essentials Core Language Features of Interest Excerpt From 12/4/08 Microsoft Presentation Slides by Dave Fayram dfayram@microsoft.com © 2008 Powerset
  • 2. Erlang Basics • A Functional Language • Based around pattern matching, a total lack of shared state, and a flexible message passing system. • Lightweight Processes are just tail- recursive functions executing in parallel. © 2008 Powerset
  • 3. Erlang Example © 2008 Powerset
  • 4. Pattern Matching • Erlang has no assignment. • Every “=” statement forms a relationship. • Type descriptions are also valid for pattern matching. © 2008 Powerset
  • 5. Pattern Matching © 2008 Powerset
  • 6. Lightweight Processes • Any function (named or anonymous) can become a process. • A process is simply a function executing in parallel. • Process semantics mirror function semantics. © 2008 Powerset
  • 7. Lightweight Processes • Extremely Efficient! • Modern systems can accommodate literally millions of Erlang processes. • Erlang LWP can be run in parallel on multiple CPUs. • Programs heavily reliant on processes tend to get free performance boosts. © 2008 Powerset
  • 8. Lightweight Processes © 2008 Powerset
  • 9. Lightweight Processes © 2008 Powerset
  • 10. Asynchronous Messages • The “!” operator sends messages. • Asynchronous, no guarantee of delivery. • The “receive” statement matches messages. • One call to receive, one message removed from the process message queue. • Uses Pattern Matching to select messages © 2008 Powerset
  • 11. [target] ! [message] © 2008 Powerset
  • 12. Asynchronous Messages © 2008 Powerset
  • 13. Asynchronous Messages © 2008 Powerset
  • 14. Asynchronous Messages © 2008 Powerset
  • 15. Asynchronous Messages • Erlang does not distinguish between “local” processes and “remote” processes. • This is the core of Erlang’s distributed programming. • Semantics are identical (already, no strong guarantees of message delivery). © 2008 Powerset
  • 16. Asynchronous Messages © 2008 Powerset
  • 17. Asynchronous Messages © 2008 Powerset