object-oriented-vs-functional-programming.pdf
(
1553 KB
)
Pobierz
Object-Oriented
vs. Functional
Programming
Bridging the Divide Between
Opposing Paradigms
Richard Warburton
Object-Oriented vs.
Functional Programming
Bridging the Divide Between
Opposing Paradigms
Richard Warburton
Object-Oriented vs. Functional Programming
by Richard Warburton
Copyright © 2016 O’Reilly Media. All rights reserved.
Printed in the United States of America.
Published by O’Reilly Media, Inc., 1005 Gravenstein Highway North, Sebastopol, CA
95472.
O’Reilly books may be purchased for educational, business, or sales promotional use.
Online editions are also available for most titles (http://safaribooksonline.com). For
more information, contact our corporate/institutional sales department:
800-998-9938 or
corporate@oreilly.com
.
Editor:
Brian Foster
Production Editor:
Nicholas Adams
Copyeditor:
Amanda Kersey
Proofreader:
Nicholas Adams
November 2015:
First Edition
Interior Designer:
David Futato
Cover Designer:
Randy Comer
Illustrator:
Rebecca Demarest
Revision History for the First Edition
2015-10-30:
First Release
While the publisher and the author have used good faith efforts to ensure that the
information and instructions contained in this work are accurate, the publisher and
the author disclaim all responsibility for errors or omissions, including without limi‐
tation responsibility for damages resulting from the use of or reliance on this work.
Use of the information and instructions contained in this work is at your own risk. If
any code samples or other technology this work contains or describes is subject to
open source licenses or the intellectual property rights of others, it is your responsi‐
bility to ensure that your use thereof complies with such licenses and/or rights.
978-1-491-93342-8
[LSI]
Table of Contents
Introduction. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . vii
1. Lambdas: Parameterizing Code by Behavior. . . . . . . . . . . . . . . . . . . . . 1
Why Do I Need to Learn About Lambda Expressions?
The Basics of Lambda Expressions
Summary
Lambda-Enabled SOLID Principles
The Single-Responsibility Principle
The Open/Closed Principle
The Liskov Substitution Principle
The Interface-Segregation Principle
The Dependency-Inversion Principle
Summary
Functional Design Patterns
The Command Pattern
Strategy Pattern
Summary
1
2
5
2. SOLID Principles. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7
7
7
10
14
15
17
21
23
23
28
31
33
34
3. Design Patterns. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23
4. Conclusions. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33
Object-Oriented vs. Functional Languages
Programming Language Evolution
v
Plik z chomika:
tostao
Inne pliki z tego folderu:
MACHINE_LEARNING_WITH_SPARK.mobi
(9075 KB)
9781783288519-MACHINE_LEARNING_WITH_SPARK.epub
(5787 KB)
9781783288519-MACHINE_LEARNING_WITH_SPARK.pdf
(4699 KB)
Akka in Action.pdf
(16058 KB)
Amazon Web Services in Action.pdf
(26379 KB)
Inne foldery tego chomika:
Pliki dostępne do 19.01.2025
bmw-gps
filmy
jezyki
komorka_dzwonki
Zgłoś jeśli
naruszono regulamin