作者:MichaelFogus
出版社:O'ReillyMedia
副标题:IntroducingFunctionalProgrammingwithUnderscore.js
出版年:2013-6-17
页数:260
定价:USD29.99
装帧:Paperback
ISBN:9781449360726
内容简介
······
While some web developers dismiss JavaScript as a flawed language, this succinct book shows you how to make the best of it by practicing a functional style of JavaScript programming. Written by Michael Fogus – a core contributor to Clojure and ClojureScript, and author of The Joy of Clojure (Manning) – this book is packed with not only the how of functional programming, but also the why. Each topic illustrated with pointed examples. You'll also get a thorough reference to the Underscore.js library and its idioms, including: Closures Applicative programming Laziness Immutability Higher-order functions Purity Combinators Currying and partial application
作者简介
······
Michael Fogus
Michael Fogus is software developer with experience in distributedsimulation, machine vision, and expert systems construction. He's actively involved in the Clojure and Scala communities.
http://www.fogus.me/
目录
······
Chapter 1 Introducing Functional JavaScript
The Case for JavaScript
Getting Started with Functional Programming
The Case for Underscore
Summary
Chapter 2 First-Class Functions and Applicative Programming
Functions as First-Class Things
Applicative Programming
Data Thinking
Summary
Chapter 3 Variable Scope and Closures
Global Scope
Lexical Scope
Dynamic Scope
Function Scope
Closures
Summary
Chapter 4 Higher-Order Functions
Functions That Take Other Functions
Functions That Return Other Functions
Putting It All Together: Object Validators
Summary
Chapter 5 Function-Building Functions
The Essence of Functional Composition
Currying
Partial Application
Stitching Functions End-to-End with Compose
Summary
Chapter 6 Recursion
Self-Absorbed Functions (Functions That Call Themselves)
Codependent Functions (Functions Calling Other Functions That Call Back)
Too Much Recursion!
Recursion Is a Low-Level Operation
Summary
Chapter 7 Purity, Immutability, and Policies for Change
Purity
Immutability
Policies for Controlling Change
Summary
Chapter 8 Flow-Based Programming
Chaining
Pipelining
Data Flow versus Control Flow
Summary
Chapter 9 Programming Without Class
Data Orientation
Mixins
}).call("Finis");
Appendix Functional JavaScript in the Wild
Functional Libraries for JavaScript
Functional Programming Languages Targeting JavaScript
Appendix Annotated Bibliography
Papers/Books/Blog Posts/Talks
Presentations
Blog Posts
Journal Articles
Colophon
评论 ······
明明是好书,为什么读着这么不对味
快成为 Fogus (另著有"The Joy of Clojure") 的脑残粉了。这本书就算用来做函数式编程的入门也是很好的。"The first rule of my personal programming style has always been the following: Write beautiful code. "
好书值得看
Appendix B最好看了。。
评论前必须登录!
注册