Erlang程序设计(第2版) - [瑞典] Joe Armstrong

Erlang程序设计(第2版)

[瑞典] Joe Armstrong

出版时间

2014-05-31

ISBN

9787115354570

评分

★★★★★

标签

编程

书籍介绍

本书由Erlang之父Joe Armstrong编写,是毋庸置疑的经典著作。书中兼顾了顺序编程、并发编程和分布式编程,重点介绍如何编写并发和分布式的Erlang程序以及如何在多核CPU上自动加速程序,并深入地讨论了开发Erlang应用中至关重要的文件和网络编程、OTP、ETS和DETS等主题。第2版全新改写,反应了自第1版面世以来Erlang历经的所有变化,添加了大量针对初学者的内容,并在每章后都附上了练习题。

AI导读
核心看点
  • Erlang之父亲笔,权威解读并发与分布式编程核心思想
  • 深入讲解OTP、ETS及多核加速,兼顾顺序与并发编程
  • 第二版全新改写,新增初学者内容与习题,紧跟语言变化
适合谁读
  • 希望系统学习Erlang语法及并发模型的初级开发者
  • 对函数式编程、高并发系统设计感兴趣的计算机从业者
  • 需要构建高可用、分布式系统的后端工程师
读前提醒
  • 需转变思维,接受不可变变量与模式匹配等函数式特性
  • 部分工具如rebar已更新,建议结合最新文档对照学习
  • 书中理论性强,建议配合官方文档及实战项目加深理解
读者共识
  • 作为Erlang入门首选经典,是理解该语言精髓的必读之作
  • 作者行文如聊天般自然,但部分章节较深,适合跳读学习
  • 语法独特且并发思想深刻,需多次阅读并动手练习才能掌握

本导读基于书籍简介、目录、原文摘录、短评和书评生成,不等同于全文精读。

精彩摘录
  • "The world is parallel. If we want to write programs that behave as other objects behave in the real world, then these programs will have a concurrent structure. Use a language that was designed for writing concurrent applications, and development becomes a lot easier. Erlang programs model how we th"
  • "Functional programming forbids code with side effects. Side effects and concurrency don’t mix. You can have sequential code with side effects, or you can have code and concurrency that is free from side effects.You have to choose. There is no middle way."
  • "Erlang is a language where concurrency belongs to the programming language and not the operating system."
  • "A guard sequence is either a single guard or a series of guards, separated by semicolons (;). The guard sequence G1; G2; ...; Gn is true if at least one of the guards—G1, G2, ...—evaluates to true. A guard is a series of guard expressions, separated by commas (,). The guard GuardExpr1, GuardExpr2, ."
  • "1. When we enter a receive statement, we start a timer (but only if an after section is present in the expression). 2. Take the first message in the mailbox and try to match it against Pattern1, Pattern2, and so on. If the match succeeds, the message is removed from the mailbox, and the expressions "
  • "Download edemo2.erl 1> edemo2:start(false, abc). Process c received {'EXIT',<0.81.0>,abc} Process a received {'EXIT',<0.81.0>,abc} process b (<0.81.0>) is dead process c (<0.82.0>) is alive ok 2> edemo2:start(false, normal). process b (<0.85.0>) is alive process c (<0.86.0>) is alive ok 3> edemo2:st"
  • "Note: When you read this code, you’ll see we just used a variable Pid everywhere. This is the process identifier of the linked process. We can’t use a variable name like LinkedPid to say this, because before we have evaluated link(Pid), it’s not a linked process. When you see a message like {’EXIT’,"
  • "Step 1: Start an Erlang node on doris: doris $ erl -name gandalf -setcookie abc (gandalf@doris.myerl.example.com) 1> kvs:start(). true Step 2: Start an Erlang node on george, and send some commands to gandalf: george $ erl -name bilbo -setcookie abc (bilbo@george.myerl.example.com) 1> rpc:call(ganda"
作者简介
作者简介: Joe Armstrong Erlang最初的设计者和实现者,也是Erlang OTP系统项目的首席架构师。他拥有瑞典皇家理工学院博士学位,是容错系统开发领域的世界级专家。现就职于爱立信公司。 译者简介: 牛化成 2004年毕业于浙江工商大学广告学专业,文学学士。2000年开始制作网站,对各种Web前后端技术多有深入了解。习惯思考,热爱新知,出于个人兴趣一直关注互联网各种前沿领域,并长期追踪传播学、心理学、神经科学和视觉设计等方面的最新成果。自由职业者,目前正在设计开发一个面向未来的新型网站。
目录
第一部分 为何用Erlang
第1章 什么是并发  2
1.1  给并发建模  2
1.1.1  开始模拟  3
1.1.2  发送消息  4

显示全部
用户评论
FP果然泪目,还得读几遍....列表推导和模式匹配不能更好用!
Erlang的语法实在太怪了,感觉要看不下了,又有一本书要烂尾了⊙﹏⊙
是也乎 ╮(╯▽╰)╭ erl 创始人写的书…时隔多年良心升级了 --&gt; 对比 guido 老爹~一本也没写啊啊啊啊啊啊啊啊 --&gt; 和第一版一样~相似的结构和风格 --&gt; 更象聊天儿~而不是编程语言教程~ 没有隔壁专讲 OTP 设计思想的书好味… 初学者建议直接看最后一章… 在一个可运行有功能的运动中代码上学习是最好的了~
基础get, 还要练习
看完 Coders at work的访谈第二天来标记. 作者刚刚去世,祝安息
代入了一种完全不同的世界观 看Erlang杂技一样地处理并发 会讲故事的人不多 能讲出一个自洽世界的人更少 如果这个人还懂幽默 就很难让人不喜欢
https://github.com/liu-jianhao/ProgrammingErlang 源代码和课后习题答案
个人认为精髓在于并发的思想:每个进程都有自己独立的记忆,通过相互沟通来改变记忆,进行协作。
@2020-01-18 15:47:44
第一遍觉得很难,主要是OTP和函数式编程不熟悉。熟悉之后这本书可以当做简易小册子来查漏补缺。
下载
收藏