Seven Languages in Seven Weeks: A Pragmatic Guide to Learning Programming Languages (Pragmatic Programmers)

Seven Languages in Seven Weeks: A Pragmatic Guide to Learning Programming Languages (Pragmatic Programmers)

Bruce Tate

Language: English

Pages: 328

ISBN: 193435659X

Format: PDF / Kindle (mobi) / ePub


You should learn a programming language every year, as recommended by The Pragmatic Programmer. But if one per year is good, how about Seven Languages in Seven Weeks? In this book you'll get a hands-on tour of Clojure, Haskell, Io, Prolog, Scala, Erlang, and Ruby. Whether or not your favorite language is on that list, you'll broaden your perspective of programming by examining these languages side-by-side. You'll learn something new from each, and best of all, you'll learn how to learn a language quickly.

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.

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

sum of your experience. I hope this book has helped you find your voice. Most of all, I hope you had fun. Footnotes [30] Scala also supports list comprehensions, but we did not use them. Appendix 1 Bibliography * * * [Arm07] Joe Armstrong. Programming Erlang: Software for a Concurrent World. The Pragmatic Bookshelf, Raleigh, NC and Dallas, TX, 2007. [Gra04] Paul Graham. Hackers and Painters: Big Ideas from the Computer Age. O’Reilly & Associates, Inc, Sebastopol, CA, 2004.

knowledge base. It works just fine: | ?- concatenate([malfoy], [potter], What). What = [malfoy,potter] yes Now, we can define another couple of rules to concatenate lists of lengths 2 and 3. They work in the same way: prolog/concat_step_3.pl concatenate([], List, List). concatenate([Head|[]], List, [Head|List]). concatenate([Head1|[Head2|[]]], List, [Head1, Head2|List]). concatenate([Head1|[Head2|[Head3|[]]]], List, [Head1, Head2, Head3|List]). | ?-

pleased to see that Bruce’s taste in programming languages is eclectic. He covers not only the well-established languages such as Ruby but also less-well-appreciated languages like Io. Ultimately, programming is about understanding, and understanding is about ideas. So, exposure to new ideas is essential to a deeper understanding of what programming is all about. A Zen master might tell you that to be better at mathematics you’d better study Latin. Thus it is with programming. To better

like Haskell. In this sense, Scala is a Frankenstein monster of sorts but not a monster. Think Edward Scissorhands.[10] In this surreal Tim Burton movie, Edward was part boy, part machine, with scissors for hands, and was one of my favorite characters of all time. Edward was a fascinating character in a beautiful movie. He was often awkward, was sometimes amazing, but always had a unique expression. Sometimes, his scissors let him do incredible things. Other times, he was awkward and humiliated.

definition works exactly like any class definition, but it creates a singleton object. In Scala, you can have both an object definition and a class definition with the same name. Using this scenario, you can create class methods within the singleton object declaration and instance methods within the class declaration. In our example, the method rule is a class method. This strategy is called companion objects. Inheritance Inheritance in Scala is pretty straightforward, but the syntax must

Download sample

Download