learning_scala.pdf

(3989 KB) Pobierz
Scala
PRACTICAL FUNCTIONAL PROGRAMMING
FOR THE JVM
Learning
Jason Swartz
Learning Scala
Why learn Scala? You don’t need to be a data scientist or distributed
computing expert to appreciate this object-oriented functional programming
language. This practical book provides a comprehensive yet approachable
introduction to the language, complete with syntax diagrams, examples, and
exercises. You’ll start with Scala's core types and syntax before diving into
higher-order functions and immutable data structures.
Author Jason Swartz demonstrates why Scala’s concise and expressive
syntax make it an ideal language for Ruby or Python developers who want
to improve their craft, while its type safety and performance ensures that
it’s stable and fast enough for any application.
Whether you're
experienced in Python
or more familiar with
Java, you'll find this book
a friendly introduction
to Scala. Jason's
writing is practical and
approachable; Learning
Scala provides a clear
beginner's guide by
combining a familiar
object-oriented style with
idiomatic features of the
language. It's the book
I wish I had when I first
started!
Learn about the core data types, literals, values, and variables
Discover how to think and write in expressions, the foundation
for Scala's syntax
Write higher-order functions that accept or return other
functions
Become familiar with immutable data structures and easily
transform them with type-safe and declarative operations
Create custom infix operators to simplify existing operations or
even to start your own domain-specific language
Build classes that compose one or more traits for full
reusability, or create new functionality by mixing them in at
instantiation
Software Engineer, Comcast, Inc.
—Katherine Fellows
Jason Swartz
is a software developer who adores intuitive user interfaces,
expressive programming languages, and concise user documentation. He also
organizes Scala community events in San Francisco and develops applications for
Netflix’s consumer device program.
SC AL A /JAVA /PROGR AMMING L ANGUAGES
Twitter: @oreillymedia
facebook.com/oreilly
US $39.99
CAN $41.99
ISBN: 978-1-449-36793-0
Learning Scala
Jason Swartz
Learning Scala
by Jason Swartz
Copyright © 2015 Jason Swartz. 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.
Editors:
Simon St. Laurent and Meghan Blanchette
Production Editor:
Colleen Lobner
Copyeditor:
Kim Cofer
Proofreader:
Charles Roumeliotis
December 2014:
First Edition
Indexer:
Ellen Troutman
Cover Designer:
Ellie Volckhausen
Interior Designer:
David Futato
Illustrator:
Rebecca Demarest
Revision History for the First Edition:
2014-12-08:
First release
See
http://oreilly.com/catalog/errata.csp?isbn=9781449367930
for release details.
The O’Reilly logo is a registered trademark of O’Reilly Media, Inc.
Learning Scala,
the cover image, and
related trade dress are trademarks of O’Reilly Media, Inc.
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 O’Reilly Media, Inc. was aware of a trademark
claim, the designations have been printed in caps or initial caps.
While the publisher and the authors have used good faith efforts to ensure that the information and in‐
structions contained in this work are accurate, the publisher and the authors disclaim all responsibility for
errors or omissions, including without limitation 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 responsibility to ensure that your use thereof complies
with such licenses and/or rights.
ISBN: 978-1-449-36793-0
[LSI]
For my loving wife, who foresees great prospects; and for my loving daughter, who also
foresees the first printed copy coming her way.
Zgłoś jeśli naruszono regulamin