Real World Haskell

Bryan O'Sullivan, John Goerzen, Don Stewart

出版时间

2008-12-01

ISBN

9780596514983

评分

★★★★★
书籍介绍
这本书最耐人寻味的地方,恰恰在它'想带你走进真实世界'的野心与'终究更像一本cookbook'的现实之间那道裂缝。它确实做到了让读者尽早'弄脏手'——从统计字符数这种小程序一路搭到大型应用,把I/O、并发、性能优化等实战议题摊开给你看。但真正吸引读者的,是它逼着你重新思考'函数'这件事:同样的输入永远得到同样的输出、惰性求值让'sort-then-take'反而高效、monad被用来优雅地表达I/O。它适合那些已熟悉一门语言、想理解函数式思维为何不同的程序员。只是请降低对'讲解清晰、紧跟库更新'的期待——不少读者正是从这堆纰漏里,自己爬出了那个'掉进去爬了一小时'的大坑。
作者简介
Bryan O'Sullivan is an Irish hacker and writer who likes distributed systems, open source software, and programming languages. He was a member of the initial design team for the Jini network service architecture (subsequently open sourced as Apache River). He has made significant contributions to, and written a book about, the popular Mercurial revision control system. He lives in San Francisco with his wife and sons. Whenever he can, he runs off to climb rocks. Don Stewart is an Australian hacker, currently completing his computer science doctorate at the University of New South Wales, Sydney. Don has been involved in a diverse range of Haskell projects, including practical libraries such as Data.ByteString and Data.Binary, as well applying the Haskell philosophy to real world applications, including compilers, linkers, text editors, network servers and systems software. His recent work has focused on optimising Haskell for high-performance scenarios, using techniques from term rewriting. He is the current editor of the Haskell Weekly News. John Goerzen is an American hacker and author. He has written a number of real-world Haskell libraries and applications, including the HDBC database interface, the ConfigFile configuration file interface, a podcast downloader, and various other libraries relating to networks, parsing, logging, and POSIX code. John has been a developer for the Debian GNU/Linux operating system project for over 10 years and maintains numerous Haskell libraries and code for Debian. He also served as President of Software in the Public Interest, Inc., the legal parent organization of Debian. John lives in rural Kansas with his wife and son, where he enjoys photography and geocaching.
AI导读
核心看点
  • 面向有经验程序员,快速切入函数式编程实战
  • 涵盖IO、并发、性能优化等真实世界开发难题
  • 通过大量实例解析Haskell核心概念与库使用
读者共识
  • 实战技巧丰富,但部分章节讲解晦涩且存在错误
  • 相比官方文档更贴近人类阅读,但深度有限
  • 适合当作工具书查阅,不建议从头到尾线性阅读
精彩摘录
  • "4.Modify the WC.hs example again, to print the number of characters in a file."
  • "Don't expect to understand this yet; it's just fun to get our hands dirty."
  • "In Haskell, we de-emphasise code that modifies data. Instead, we focus on functions that take immutable values as input and produce new values as output. Given the same inputs, these functions always return the same results. This is a core idea behind functional programming."
  • "Lazy evaluation has some spooky effects. Let's say we want to find the k least-valued elements of an unsorted list. In a traditional language, the obvious approach would be to sort the list and take the first k elements, but this is expensive. For efficiency, we would instead write a special functio"
  • "Many traditional languages further blur the already indistinct boundary between concurrent and parallel programming, because they force programmers to use the same primitives to construct both kinds of programs. Another useful distinction between concurrent and parallel programs lies in their intera"
  • "* If no other thread concurrently modifies the same data as us, all of our modifications will simultaneously become visible to other threads. * Otherwise, our modifications are discarded without being performed, and our block of actions is automatically restarted."
  • "The record that we use to track an unevaluated expression is referred to as a _thunk_"
用户评论
读完才发现-掉尼玛天坑里面去了,这书就是个开胃小菜啊。Haskell本身的复杂程度爆C++半条街。
这本书相当的厚,六百多页,我是读了好久。缺点是不适合初学者,错误的地方也比较多,讲解也不是很明白。优点是实战技巧很多,尤其是剖析和优化代码有一套很好的方法和工具。
这本书对语言本身的介绍稍微少了一点.
挑着对我有用的读了读。。感觉在类型方面想要吃透肯定还需要其他书作补充的
好书!
写个简单的parser真是检测基本功力的方式....
不推荐。 funcprog写realworld的东西,一方面无比复杂罗嗦,一方面失去了funcprog的美。故不建议看这本书。 @2011-04-24 12:30:06
http://cnhaskell.com/
看完 Learn You a Haskell for Great Good! 这本书后再看这本会比较轻松, 这本书主要是介绍如何运用 haskell 各种库, 并不适合入门 haskell,以及了解 haskell 的语言特点
用来入门可以,不推荐有一定Haskell基础后的深入,因为真的有点复杂啰嗦。
下载
收藏