• Complain

Michael Bevilacqua-Linn - Functional Programming Patterns in Scala and Clojure: Write Lean Programs for the JVM

Here you can read online Michael Bevilacqua-Linn - Functional Programming Patterns in Scala and Clojure: Write Lean Programs for the JVM full text of the book (entire story) in english for free. Download pdf and epub, get meaning, cover and reviews about this ebook. year: 2013, publisher: Pragmatic Bookshelf, genre: Computer. Description of the work, (preface) as well as reviews are available. Best literature library LitArk.com created for fans of good reading and offers a wide selection of genres:

Romance novel Science fiction Adventure Detective Science History Home and family Prose Art Politics Computer Non-fiction Religion Business Children Humor

Choose a favorite category and find really read worthwhile books. Enjoy immersion in the world of imagination, feel the emotions of the characters or learn something new for yourself, make an fascinating discovery.

Michael Bevilacqua-Linn Functional Programming Patterns in Scala and Clojure: Write Lean Programs for the JVM
  • Book:
    Functional Programming Patterns in Scala and Clojure: Write Lean Programs for the JVM
  • Author:
  • Publisher:
    Pragmatic Bookshelf
  • Genre:
  • Year:
    2013
  • Rating:
    4 / 5
  • Favourites:
    Add to favourites
  • Your mark:
    • 80
    • 1
    • 2
    • 3
    • 4
    • 5

Functional Programming Patterns in Scala and Clojure: Write Lean Programs for the JVM: summary, description and annotation

We offer to read an annotation, description, summary or preface (depends on what the author of the book "Functional Programming Patterns in Scala and Clojure: Write Lean Programs for the JVM" wrote himself). If you haven't found the necessary information about the book — write in the comments, we will try to find it.

Functional languages have their own patterns that enable you to solve problems with less code than object-oriented programming alone. This book introduces you, the experienced Java programmer, to Scala and Clojure practical, production-quality languages that run on the JVM and interoperate with existing Java. By using both the statically typed, type-inferred Scala and the dynamically typed, modern Lisp Clojure, youll gain a broad understanding of functional programming.

Michael Bevilacqua-Linn: author's other books


Who wrote Functional Programming Patterns in Scala and Clojure: Write Lean Programs for the JVM? Find out the surname, the name of the author of the book and a list of all author's works by series.

Functional Programming Patterns in Scala and Clojure: Write Lean Programs for the JVM — read online for free the complete book (whole text) full work

Below is the text of the book, divided by pages. System saving the place of the last page read, allows you to conveniently read the book "Functional Programming Patterns in Scala and Clojure: Write Lean Programs for the JVM" online for free, without having to search again every time where you left off. Put a bookmark, and you can go to the page where you finished reading at any time.

Light

Font size:

Reset

Interval:

Bookmark:

Make
Functional Programming Patterns in Scala and Clojure Write Lean Programs for - photo 1
Functional Programming Patterns in Scala and Clojure
Write Lean Programs for the JVM
by Michael Bevilacqua-Linn
Version: P1.0 (October 2013)
Copyright 2013 The Pragmatic Programmers, LLC. This book is licensed tothe individual who purchased it. We don't copy-protect itbecause that would limit your ability to use it for yourown purposes. Please don't break this trustyou can use this across all of your devices but please do not share this copywith other members of your team, with friends, or via file sharing services. Thanks.
Dave & Andy.

Many of the designations used by manufacturers and sellers to distinguish their products are claimed as trademarks. Where those designations appear in this book, and The Pragmatic Programmers, LLC was aware of a trademark claim, the designations have been printed in initial capital letters or in all capitals. The Pragmatic Starter Kit, The Pragmatic Programmer, Pragmatic Programming, Pragmatic Bookshelf and the linking g device are trademarks of The Pragmatic Programmers, LLC.

Every precaution was taken in the preparation of this book. However, the publisher assumes no responsibility for errors or omissions, or for damages that may result from the use of information (including program listings) contained herein.

Our Pragmatic courses, workshops, and other products can help you and your team create better software and have more fun. For more information, as well as the latest Pragmatic titles, please visit us at http://pragprog.com.

Table of Contents
Copyright 2013, The Pragmatic Bookshelf.
Early Praise for Functional Programming Patterns

This book is an absolute gem and should be required reading for anybody looking to transition from OO to FP. It is an extremely well-built safety rope for those crossing the bridge between two very different worlds. Consider this mandatory reading.

Colin Yates, technical team leader at QFI Consulting, LLP

This book sticks to the meat and potatoes of what functional programming can do for the object-oriented JVM programmer. The functional patterns are sectioned in the back of the book separate from the functional replacements of the object-oriented patterns, making the book handy reference material. As a Scala programmer, I even picked up some new tricks along the read.

Justin James, developer with Full Stack Apps

This book is good for those who have dabbled a bit in Clojure or Scala but are not really comfortable with it; the ideal audience is seasoned OO programmers looking to adopt a functional style, as it gives those programmers a guide for transitioning away from the patterns they are comfortable with.

Rod Hilton, Java developer and PhD candidate at the University of Colorado

Acknowledgments

Id like to thank my parents, without whom I would not exist.

Thanks also go to my wonderful girlfriend, who put up with many a night and weekend listening to me mutter about code samples, inconsistent tenses, and run-on sentences.

This book would have suffered greatly without a great group of technical reviewers. My thanks to Rod Hilton, Michajlo Mishu Matijkiw, Venkat Subramaniam, Justin James, Dave Cleaver, Ted Neward, Neal Ford, Richard Minerich, Dustin Campbell, Dave Copeland, Josh Carter, Fred Daoud, and Chris Smith.

Finally, Id like to thank Dave Thomas and Andy Hunt. Their book, The Pragmatic Programmer, is one of the first books I read when I started my career. It made a tremendous impact, and Ive still got my original dog-eared, fingerprint-covered, bruised and battered copy. In the Pragmatic Bookshelf, theyve created a publisher thats truly dedicated to producing high-quality technical books and supporting the authors who write them.

Copyright 2013, The Pragmatic Bookshelf.

Preface

This book is about patterns and functional programming in Scala and Clojure. It shows how to replace, or greatly simplify, many of the common patterns we use in object-oriented programming, and it introduces some patterns commonly used in the functional world.

Used together, these patterns let programmers solve problems faster and in a more concise, declarative style than with object-oriented programming alone. If youre using Java and want to see how functional programming can help you work more efficiently, or if youve started using Scala and Clojure and cant quite wrap your head around functional problem-solving, this is the book for you.

Before we dig in, Id like to start off with a story. This story is true, though some names have been changed to protect the not-so-innocent.

A Tale of Functional Programming
by Michael Bevilacqua-Linn, software firefighter
Michael Bevilacqua-Linn

The site isnt down, but an awful lot of alarms are going off. We trace the problems to changes someone made to a third-party API we use. The changes are causing major data problems on our side; namely, we dont know what the changes are and we cant find anyone who can tell us. It also turns out the system that talks to the API uses legacy code, and the only guy who knows how to work on it happens to be away on vacation. This a big system: 500,000-lines-of-Java-and-OSGI big.

Support calls are flooding in, lots of them. Expensive support calls from frustrated customers. We need to fix the problem quickly. I start up a Clojure REPL and use it to poke around the problem API.

My boss pokes his head into my office. Hows it going? he asks. Working on it, I say. Ten minutes later, my grandboss pokes his head into my office. Hows it going? he asks. Working on it, I say. Another ten minutes pass by when my great-grandboss pokes his head into my office. Hows it going? he asks. Working on it, I say. I get a half hour of silence before the CTO pokes his head into my office. Working on it, I say before he opens his mouth.

An hour passes, and I figure out whats changed. I whip up a way to keep the data clean until the legacy developer gets back and can put together a proper fix. I hand my little program off to the operations team, which gets it up and running in a JVM, somewhere safe. The support calls stop coming in, and everyone relaxes a bit.

A week or so later at an all-hands meeting, the great-grandboss thanks me for the Java program I wrote that saved the day. I smile and say, That wasnt Java.

The REPL, Clojures interactive programming environment, helped a lot in this story. However, lots of languages that arent particularly functional have similar interactive programming environments, so thats not all there is to it.

Two of the patterns that well see in this book, Pattern 21, , contributed greatly to this storys happy ending.

Earlier on, I had written a small instance of domain-specific language for working with these particular APIs that helped me explore them very quickly even though theyre very large and it was difficult to figure out where the problem might lie. In addition, the powerful data transformation facilities that functional programming relies on, such as the examples well see in Pattern 15, , helped me quickly write code to clean up the mess.

How This Book Is Organized

Well start with an introduction to patterns and how they relate to functional programming. Then well take a look at an extended example, a small web framework called TinyWeb. Well first show TinyWeb written using classic object-oriented patterns in Java. Well then rewrite it, piece by piece, to a hybrid style that is object oriented and functional, using Scala. Well then write in a functional style using Clojure.

Next page
Light

Font size:

Reset

Interval:

Bookmark:

Make

Similar books «Functional Programming Patterns in Scala and Clojure: Write Lean Programs for the JVM»

Look at similar books to Functional Programming Patterns in Scala and Clojure: Write Lean Programs for the JVM. We have selected literature similar in name and meaning in the hope of providing readers with more options to find new, interesting, not yet read works.


Reviews about «Functional Programming Patterns in Scala and Clojure: Write Lean Programs for the JVM»

Discussion, reviews of the book Functional Programming Patterns in Scala and Clojure: Write Lean Programs for the JVM and just readers' own opinions. Leave your comments, write what you think about the work, its meaning or the main characters. Specify what exactly you liked and what you didn't like, and why you think so.