
本网站不提供下载链接,喜欢看书的朋友请关注公众号:【lennylee的碎碎念】(lennyleede),首页回复:授人以渔,自动获取搜索资源的方法。
内容简介:
Ruby, Io, Prolog, Scala, Erlang, Clojure, Haskell. With Seven Languages in Seven Weeks, by Bruce A. Tate, you’ll go beyond the syntax-and beyond the 20-minute tutorial you’ll find someplace online. This book has an audacious goal: to present a meaningful exploration of seven languages within a single book. Rather than serve as a complete reference or installation guide, Seven Languages hits what’s essential and unique about each language. Moreover, this approach will help teach you how to grok new languages.
For each language, you’ll solve a nontrivial problem, using techniques that show off the language’s most important features. As the book proceeds, you’ll discover the strengths and weaknesses of the languages, while dissecting the process of learning languages quickly–for example, finding the typing and programming models, decision structures, and how you interact with them.
Among this group of seven, you’ll explore the most critical programming models of our time. Learn the dynamic typing that makes Ruby, Python, and Perl so flexible and compelling. Understand the underlying prototype system that’s at the heart of JavaScript. See how pattern matching in Prolog shaped the development of Scala and Erlang. Discover how pure functional programming in Haskell is different from the Lisp family of languages, including Clojure.
Explore the concurrency techniques that are quickly becoming the backbone of a new generation of Internet applications. Find out how to use Erlang’s let-it-crash philosophy for building fault-tolerant systems. Understand the actor model that drives concurrency design in Io and Scala. Learn how Clojure uses versioning to solve some of the most difficult concurrency problems.
It’s all here, all in one place. Use the concepts from one language to find creative solutions in another-or discover a language that may become one of your favorites.
作者简介:
(Biography)
I started in this industry back in 1985, as a co-op with IBM in Austin. I joined IBM full time in 1987, and spent 13 years with them. I later left to join a startup, and ultimately started my own business where I focus on helping customers build software with lightweight technologies.
I’ve been writing technical books for more than 10 years now, with the last 7 coming since 2000. I write for the love of the craft.
Others have told me that my fundamental strength as an author is the ability to quickly recognize emerging trends. I do tend to find emerging frameworks just as they become popular, and that skill is a mixed blessing that–combined with my complete lack of political tact–gets me in trouble sometimes, as it did with Bitter Java (Java is too hard), Beyond Java (Java is not going to last forever), and most recently, From Java to Ruby: Things Every Manager should Know (there’s a better language for some problems, but our managers don’t know it yet.)
My promise to you is this: I will always seek to find better ways to do things, and will work hard to tell you the truth, without regard for any notion of political correctness. Thanks for reading.
Changes 9
Beta 2.0 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9
Foreword 10
1 Introduction 13
1.1 Method to the Madness . . . . . . . . . . . . . . . . . . 13
1.2 The Languages . . . . . . . . . . . . . . . . . . . . . . . 15
1.3 Buy this Book… . . . . . . . . . . . . . . . . . . . . . . . 17
1.4 Don’t Buy this Book… . . . . . . . . . . . . . . . . . . . 18
1.5 Acknowledgements . . . . . . . . . . . . . . . . . . . . . 21
1.6 A final charge . . . . . . . . . . . . . . . . . . . . . . . . 22
2 Ruby 23
2.1 Quick history . . . . . . . . . . . . . . . . . . . . . . . . 24
2.2 Day 1: Finding a nanny . . . . . . . . . . . . . . . . . . 25
2.3 Day 2: Floating down from the sky . . . . . . . . . . . . 33
2.4 Day 3: Serious change . . . . . . . . . . . . . . . . . . . 45
2.5 Wrapping Up Ruby . . . . . . . . . . . . . . . . . . . . . 52
3 Io 56
3.1 Io . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 56
3.2 Day 1: Skipping school, hanging out . . . . . . . . . . . 57
3.3 Day 2: The Sausage King . . . . . . . . . . . . . . . . . 68
3.4 Day 3: The Parade and Other Strange Places . . . . . . 75
3.5 Wrapping Up Io . . . . . . . . . . . . . . . . . . . . . . . 84
4 Prolog 88
4.1 About Prolog . . . . . . . . . . . . . . . . . . . . . . . . . 89
4.2 Day 1. An excellent driver. . . . . . . . . . . . . . . . . . 89
4.3 Day 2: Fifteen Minutes to Wapner . . . . . . . . . . . . 101
4.4 Day 3: Blowing up Vegas . . . . . . . . . . . . . . . . . . 112
4.5 Wrapping Up . . . . . . . . . . . . . . . . . . . . . . . . . 123
5 Scala 127
5.1 About Scala . . . . . . . . . . . . . . . . . . . . . . . . . 127
5.2 Day 1: The Castle on the Hill . . . . . . . . . . . . . . . 131
5.3 Day 2: Clipping bushes and other new tricks . . . . . . 146
5.4 Day 3: Cutting through the fluff . . . . . . . . . . . . . 159
5.5 Wrapping Up Scala . . . . . . . . . . . . . . . . . . . . . 167
6 Erlang 172
6.1 Introducing Erlang . . . . . . . . . . . . . . . . . . . . . 172
6.2 Day 1: Appearing Human . . . . . . . . . . . . . . . . . 176
6.3 Day 2: Changing Forms . . . . . . . . . . . . . . . . . . 186
6.4 Day 3: The Red Pill . . . . . . . . . . . . . . . . . . . . . 197
6.5 Wrapping Up Erlang . . . . . . . . . . . . . . . . . . . . 208
7 Clojure 212
7.1 Coming Soon… . . . . . . . . . . . . . . . . . . . . . . . 212
8 Haskell 213
8.1 Coming Soon… . . . . . . . . . . . . . . . . . . . . . . . 213
9 Wrap up 214
9.1 Coming Soon… . . . . . . . . . . . . . . . . . . . . . . . 214
A Bibliography 215
Index 216
· · · · · · (收起)
原文摘录:
一等对象应具有以下几项性质:可存储于变量或数据结构中;可作为参数传递给函数;
可作为返回值从函数返回;可在运行时创建。举例来说,C++中的对象就是一等对象,但其函数无法在运行时创
建,所以不是一等对象;与之相反,函数式语言中的函数是一等对象,因为它既可以传递和返回,也可以在运行
时动态创建。 (查看原文)
寸志
2 回复
2013-07-25 14:34:23
—— 引自第12页
本书为你铺就的学习途径,较之网上那些20分钟教程可谓略胜一筹。我知道,你我同为善用 Google之人,随便搜索书中某门语言的简明教程自是不在话下。不过本书的高明之处在于,它会 带你踏上快速成长的互动之旅。你每周都会遇到一些小型的编程挑战和一个实战项目。解决它们 虽非易事,但这既能增长你的见识,还可让你体验编程之乐。
如果你阅读本书时不做任何习题,那不过是对语法有了个粗浅认识。如果你在尝试独立解答习题之前,先去网上搜索答案,那也一样意味着不及格。你首先要有试着解答习题的主观愿望, 同时也要充分认识到,有一小部分习题可能超出了你的能力范围。要知道,学会语法永远比学思 考简单。
如果以上描述让你心惊胆战,我建议你放下这本书,换本别的书看看。对你来说,也许看七 本不同的编程语言书会更轻松惬意。但是,如果你马上想到的是看这本书所能带来的回报——写 出一手更漂亮的代码——并为此激动不已,那就别犹豫了,赶紧往下看吧。 (查看原文)
木木
2017-08-17 17:20:44
—— 引自第7页