Learning Scala. Practical Functional Programming for the JVM - Helion
ISBN: 978-14-493-6883-8
stron: 256, Format: ebook
Data wydania: 2014-12-11
Księgarnia: Helion
Cena książki: 126,65 zł (poprzednio: 147,27 zł)
Oszczędzasz: 14% (-20,62 zł)
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.
- 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
Osoby które kupowały "Learning Scala. Practical Functional Programming for the JVM", wybierały także:
- Kafka w praktyce. Przetwarzanie strumieniowe i potoki danych o du 99,00 zł, (49,50 zł -50%)
- Scala. Nauka programowania 67,00 zł, (33,50 zł -50%)
- Programowanie funkcyjne. Krok po kroku 49,00 zł, (24,50 zł -50%)
- Programowanie funkcyjne. Krok po kroku 49,00 zł, (29,40 zł -40%)
- Java. Projektowanie aplikacji WWW 67,00 zł, (40,20 zł -40%)
Spis treści
Learning Scala. Practical Functional Programming for the JVM eBook -- spis treści
- Learning Scala
- Dedication
- Preface
- Who This Book Is For
- Why Write Learning Scala?
- Why Learn Scala (or, Why Should You Read Learning Scala)?
- Reason 1Your Code Will Be Better
- Reason 2Youll Be a Better Engineer
- Reason 3Youll Be a Happier Engineer
- Why Learning Scala May Not Be for You
- About the Syntax Notation in This Book
- Conventions Used in This Book
- Using Code Examples
- Safari Books Online
- How to Contact Us
- Acknowledgments
- I. Core Scala
- 1. Getting Started with the Scalable Language
- Installing Scala
- Using the Scala REPL
- Summary
- Exercises
- 2. Working with Data: Literals, Values, Variables, and Types
- Values
- Variables
- Naming
- Types
- Numeric Data Types
- Strings
- String interpolation
- Regular expressions
- An Overview of Scala Types
- Type operations
- Tuples
- Summary
- Exercises
- 3. Expressions and Conditionals
- Expressions
- Defining Values and Variables with Expressions
- Expression Blocks
- Statements
- If..Else Expression Blocks
- If Expressions
- If-Else Expressions
- Match Expressions
- Matching with Wildcard Patterns
- Matching with Pattern Guards
- Matching Types with Pattern Variables
- Loops
- Iterator Guards
- Nested Iterators
- Value Binding
- While and Do/While Loops
- Summary
- Exercises
- Expressions
- 4. Functions
- Procedures
- Functions with Empty Parentheses
- Function Invocation with Expression Blocks
- Recursive Functions
- Nested Functions
- Calling Functions with Named Parameters
- Parameters with Default Values
- Vararg Parameters
- Parameter Groups
- Type Parameters
- Methods and Operators
- Writing Readable Functions
- Summary
- Exercises
- 5. First-Class Functions
- Function Types and Values
- Higher-Order Functions
- Function Literals
- Placeholder Syntax
- Partially Applied Functions and Currying
- By-Name Parameters
- Partial Functions
- Invoking Higher-Order Functions with Function Literal Blocks
- Summary
- Exercises
- 6. Common Collections
- Lists, Sets, and Maps
- Whats in a List?
- The Cons Operator
- List Arithmetic
- Mapping Lists
- Reducing Lists
- Converting Collections
- Java and Scala Collection Compatibility
- Pattern Matching with Collections
- Summary
- Exercises
- 7. More Collections
- Mutable Collections
- Creating New Mutable Collections
- Creating Mutable Collections from Immutable Ones
- Using Collection Builders
- Arrays
- Seq and Sequences
- Streams
- Monadic Collections
- Option Collections
- Extracting values from Options
- Try Collections
- Future Collections
- Handling futures asynchronously
- Handling futures synchronously
- Option Collections
- Summary
- Exercises
- Mutable Collections
- 1. Getting Started with the Scalable Language
- II. Object-Oriented Scala
- 8. Classes
- Defining Classes
- More Class Types
- Abstract Classes
- Anonymous Classes
- More Field and Method Types
- Overloaded Methods
- Apply Methods
- Lazy Values
- Packaging
- Accessing Packaged Classes
- Packaging Syntax
- Privacy Controls
- Privacy Access Modifiers
- Final and Sealed Classes
- Summary
- Exercises
- 9. Objects, Case Classes, and Traits
- Objects
- Apply Methods and Companion Objects
- Command-Line Applications with Objects
- Case Classes
- Traits
- Self Types
- Instantiation with Traits
- Importing Instance Members
- Summary
- BreakConfiguring Your First Scala Project
- Exercises
- Objects
- 10. Advanced Typing
- Tuple and Function Value Classes
- Implicit Parameters
- Implicit Classes
- Types
- Type Aliases
- Abstract Types
- Bounded Types
- Type Variance
- Package Objects
- Summary
- Questions
- A. Reserved Words
- 8. Classes
- Index
- About the Author
- Colophon
- Copyright