Oreilly.Erlang.Programming.Jun.2009.pdf

(4762 KB) Pobierz
Erlang Programming
555774265.004.png
Download at WoweBook.Com
555774265.005.png
Erlang Programming
Francesco Cesarini and Simon Thompson
Beijing Cambridge Farnham Köln Sebastopol Taipei Tokyo
Download at WoweBook.Com
555774265.006.png
 
Erlang Programming
by Francesco Cesarini and Simon Thompson
Copyright © 2009 Francesco Cesarini and Simon Thompson. All rights reserved.
Printed in the United States of America.
Published by O’Reilly Media, Inc., 1005 Gravenstein Highway North, Sebastopol, CA 95472.
O’Reilly books may be purchased for educational, business, or sales promotional use. Online editions
are also available for most titles ( http://my.safaribooksonline.com ) . For more information, contact our
corporate/institutional sales department: (800) 998-9938 or corporate@oreilly.com .
Editor: Mike Loukides
Production Editor: Sumita Mukherji
Copyeditor: Audrey Doyle
Proofreader: Sumita Mukherji
Indexer: Lucie Haskins
Cover Designer: Karen Montgomery
Interior Designer: David Futato
Illustrator: Robert Romano
Printing History:
June 2009:
First Edition.
Nutshell Handbook, the Nutshell Handbook logo, and the O’Reilly logo are registered trademarks of
O’Reilly Media, Inc. Erlang Programming , the image of a brush-tailed rat kangaroo, and related trade
dress are trademarks of O’Reilly Media, Inc.
Many of the designations used by manufacturers and sellers to distinguish their products are claimed as
trademarks. Where those designations appear in this book, and O’Reilly Media, Inc. was aware of a
trademark claim, the designations have been printed in caps or initial caps.
While every precaution has been taken in the preparation of this book, the publisher and authors assume
no responsibility for errors or omissions, or for damages resulting from the use of the information con-
tained herein.
TM
This book uses RepKover™, a durable and flexible lay-flat binding.
ISBN: 978-0-596-51818-9
[M]
1244557300
Download at WoweBook.Com
555774265.001.png
Table of Contents
Foreword . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xiii
Preface . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xv
1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1
Why Should I Use Erlang?
1
The History of Erlang
3
Erlang’s Characteristics
4
High-Level Constructs
4
Concurrent Processes and Message Passing
5
Scalable, Safe, and Efficient Concurrency
6
Soft Real-Time Properties
6
Robustness
6
Distributed Computation
7
Integration and Openness
8
Erlang and Multicore
9
Case Studies
10
The AXD301 ATM Switch
10
CouchDB
11
Comparing Erlang to C++
12
How Should I Use Erlang?
14
2. Basic Erlang . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15
Integers
15
The Erlang Shell
16
Floats
17
Mathematical Operators
17
Atoms
19
Booleans
20
Tuples
21
Lists
22
Characters and Strings
22
iii
Download at WoweBook.Com
555774265.002.png 555774265.003.png
Zgłoś jeśli naruszono regulamin