Functional Programming in Scala

Paul Chiusano

出版时间

2014-09-14

ISBN

9781617290657

评分

★★★★★
书籍介绍
这本书最独特的地方,在于它不是教你'使用'函数式编程,而是让你亲手'造出'函数式编程。读者反复提及的关键词是'造轮子'——从递归数据结构的实现,到基于属性的测试、解析器组合子,再到单子、遍历结构,全书以'从零构建库'的方式串起整个范式。它适合那些不满足于调用现成API、想彻底理解'单子到底是什么'的程序员。书评里那句'卡在第12章不是你的问题',恰恰印证了它的难度与含金量:它要求你完成从面向对象到函数式思维的真正转化。习题与源码全数开源,使'边读边练'成为可能,这也是它被称作'红宝书、久读久新'的原因。
作者简介
Paul Chiusano and Rúnar Bjarnason are recognized experts in functional programming with Scala. Each has been writing Scala and using FP professionally for several years. Paul is a Scalaz contributor, blogs and speaks regularly on Scala and FP. Rúnar is a principal contributor to Scalaz and the Functional Java library and has been using and teaching FP since 2008.
精彩摘录
  • "要想获得任何成都的平行,这就要求两个 unit 同时对参数求值并立即返回。"
  • "Note that even an expression like 2 + 1 is just calling a member of an object. In that case, what we’re calling is the + member of the object 2. It’s really syntactic sugar for the expression 2.+(1), which passes 1 as an argument to the method + on the object 2. Scala has no special notion of operat"
目录
PART 1: INTRODUCTION TO FUNCTIONAL PROGRAMMING
1. What is functional programming? - FREE
2. Structuring functional programs - AVAILABLE
3. Functional data structures - AVAILABLE
4. Handling errors without exceptions - AVAILABLE

显示全部
用户评论
https://github.com/fpinscala/fpinscala
本书重点在于 Functional Programming,而 scala 更像是顺带一提(PL 中的工具人)。书中的习题相当烧脑,对 FP 思维方式的锻炼很有帮助。 Scala 整体的语言表达力犀利,虽然有瑕疵,但足够体验到 FP 的神奇之处。当你深刻理解 Functor、Applicative、Monad,并落地在应用中,你会看到一个完全不同的世界。在这个世界中,不止是表面上的酷炫——所有的规则都是代数的、可严格推导的,因此抽象出的原语是如此的简洁而美妙、纯粹而强悍,与人类的认知建立起一道漂亮而牢固的桥梁。 再读《Functional and Reactive Domain Modeling》或许会有更深刻的体会。
好书,清晰明了
很喜欢这本,纯粹读着舒畅的那种
好的你现在学会了四则运算,可以开始做微积分的习题啦~
比Coursera上那节sml+racket的课要好
一本学会fp!
真好,真难
Needs revisiting
求书
收藏