Search icon
Subscription
0
Cart icon
Close icon
You have no products in your basket yet
Arrow left icon
All Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Newsletters
Free Learning
Arrow right icon
Learning Scala Programming

You're reading from  Learning Scala Programming

Product type Book
Published in Jan 2018
Publisher Packt
ISBN-13 9781788392822
Pages 426 pages
Edition 1st Edition
Languages
Author (1):
Vikash Sharma Vikash Sharma
Profile icon Vikash Sharma

Table of Contents (21) Chapters

Title Page
Packt Upsell
Contributors
Preface
1. Getting Started with Scala Programming 2. Building Blocks of Scala 3. Shaping our Scala Program 4. Giving Meaning to Programs with Functions 5. Getting Familiar with Scala Collections 6. Object-Oriented Scala Basics 7. Next Steps in Object-Oriented Scala 8. More on Functions 9. Using Powerful Functional Constructs 10. Advanced Functional Programming 11. Working with Implicits and Exceptions 12. Introduction to Akka 13. Concurrent Programming in Scala 14. Programming with Reactive Extensions 15. Testing in Scala 1. Other Books You May Enjoy Index

Index

A

  • abstract classes
    • about / Abstract classes
    • traits / Abstract classes and traits
    • final classes / The final classes
  • abstract types
    • about / Abstract types
    • versus parameterized type / Abstract versus parameterized types
  • Actor
    • ActorRef / Actor references and paths
    • paths / Actor references and paths
    • lifecycle / How the Actor life cycle works
    • writing / Writing our first Actor
    • stopping / Stopping Actors
    • communication, via messages / Actor communication via messages and its semantics
    • semantics / Actor communication via messages and its semantics
    • faults, supervising / Supervising fault in our actors
    • testing / Testing actors
  • Actor Model / What's up with the Actor Model?
  • actorRefs
    • selecting, via actorSelection / Selecting existing actorRefs via actorSelection
  • ActorSystem / Understanding the Actor system
  • Akka
    • about / Why do we care about Akka?
    • Hello World / Hello world in Akka
    • environment, setting up / Setting up the environment
    • supervision strategy / Default supervision strategy
    • supervision strategy, applying / Applying the supervision strategy
  • AllForOne strategy
    • versus OneForOne / OneForOne versus AllForOne strategy
  • arithmetic operators / Arithmetic operators
  • array / Array
  • ArrayBuffer / ArrayBuffer
  • ask method
    • versus forward method / The tell versus ask versus forward method
  • assertions / Assertions
  • asynchronous programming
    • about / Asynchronous programming
    • Futures, working with / Working with Futures
    • Future computation / What if Future computations go wrong?
    • Future composition / Why not compose two or more Futures?
    • Promises, working with / Working with Promises

B

  • behavior-driven development (BDD) / Scenario, Behavior driven development (BDD)
  • bitwise operators / Bitwise operators
  • boolean literals / Boolean literals
  • bottom types / Null and Nothing

C

  • case classes / Case classes
  • character literals / Character literals
  • class Any
    • about / Any
    • AnyRef / AnyVal and AnyRef
    • AnyVal / AnyVal and AnyRef, AnyVal
  • classes / Classes
  • class inheritance
    • about / Class inheritance
    • classes, extending / Extending classes
    • subtyping, versus subclassing / Subtyping versus subclassing
    • data, overriding / Overriding data and behavior
    • behavior, overriding / Overriding data and behavior
    • inheritance, restricting / Restricting inheritance – final keyword
    • dynamic binding, in function invocation / Dynamic binding in function invocation
    • misusing / Misusing inheritance
  • closures / What are closures?
  • collection performance
    • about / Collection performance
    • URL / Collection performance
  • collections
    • using / Commonly used collections in Scala
    • list / List
    • lists / List
    • map / Map
    • SortedSet / SortedSet
    • streams / Streams
    • vector / Vector
    • immutable stack / Immutable stack
    • immutable queue / Immutable queue
    • ranges / Ranges
    • ArrayBuffer / ArrayBuffer
    • ListBuffer / ListBuffer
    • StringBuilder / StringBuilder
    • Array / Array
    • rich operation, performing / Rich operations performed on collections
    • selecting / Choosing a collection
  • collections hierarchy
    • about / Hierarchy of collections in Scala
    • traversable / Traversable
    • iterable / Iterable
  • combinators / Combinators
  • comma-separated values (CSV) / Type-classes, Type-classes ahead!
  • companion objects / Companion objects
  • composable mix-ins / Traits as composable mix-ins
  • composition / Composition and inheritance
  • concurrency
    • concepts / Building blocks of concurrency
    • processes / Understanding processes and threads
    • threads / Understanding processes and threads
    • locks / Locks and synchronization
    • synchronization / Locks and synchronization
    • executor / Executor and ExecutionContext
    • ExecutionContext / Executor and ExecutionContext
  • concurrent programming / Concurrent programming
  • conditional statements
    • about / Conditional statements
    • if else conditional expression / The if else conditional expression
  • container types / Container types
  • covariance / Variance under inheritance
  • currying
    • about / Currying
    • function, converting with multiple parameters / Converting a function with multiple parameters to curried form

D

  • data types
    • about / Data types
    • class hierarchy / Scala's class hierarchy
    • class Any / Any
    • unit / Unit
    • boolean / Boolean
    • null / Null and Nothing
    • nothing / Null and Nothing
  • default constructor / Default and parameterized constructors
  • domain-specific language (DSL) / Scenario
  • do while loop / The do while loop
  • dynamic binding
    • in function invocation / Dynamic binding in function invocation

E

  • Either type
    • using / Either left or right
  • evaluation strategies
    • about / Evaluation strategies
    • call by name / Call by name
    • call by value / Call by value
  • exception
    • handling / Exception handling – the old way

F

  • final classes / The final classes
  • f interpolator / f Interpolator
  • floating point literals / Floating point literals
  • for expressions
    • about / The for expressions, For expressions
    • for yield expressions / The for yield expressions
  • for loop / The for loop
  • for yield expressions / The for yield expressions
  • function
    • syntax / Function syntax
    • nesting / Nesting of functions
    • calling / Calling a function
    • variable number of arguments, passing / Passing a variable number of arguments
    • calling, with default parameter value / Calling a function with a default parameter value
    • calling, while passing named arguments / Calling a function while passing named arguments
    • about / Functions versus methods
    • versus methods / Functions versus methods
    • usage, determining / Methods or functions?
  • function literal / Function literals, Function literals, Function literals

G

  • generic classes / Another way around - generic classes and traits

H

  • Haskell / What are closures?
  • Hello World
    • writing, in Akka / Hello world in Akka
  • higher-order functions (HOF) / Higher-order functions

I

  • immutable collections
    • about / Immutable and mutable collections
    • versus root / Differences between the root and immutable collections
  • immutable queue / Immutable queue
  • immutable stack / Immutable stack
  • implicit conversion / Implicit conversions
  • implicitly method / The implicitly method
  • implicit parameters
    • using / Implicit parameters
  • implicits
    • about / Implicits - what and why
    • need for / Implicits - what and why
    • viewing / Implicits - what and why, Looking for implicits
    • reference link / Looking for implicits
  • importing / Packaging and importing
  • inheritance
    • about / Composition and inheritance
    • variance / Variance under inheritance
    • variance relation, using / When to use what type of variance relation
  • integer literals / Integer literals
  • iterable
    • about / Hierarchy of collections in Scala
    • sub-iterations / Iterable
    • sub-collections / Iterable
    • zipping / Iterable
    • comparisons / Iterable
    • seq / Seq
    • sequences / Sequences
    • map / Map
    • set / Set

J

  • Java
    • reference link / Java installation
  • Java collection
    • converting, into Scala collection / Converting a Java collection into a Scala collection
  • Java Virtual Machine (JVM) / Introduction to Scala, Building blocks of concurrency
  • Just in Time (JIT ) / Runs on JVM

L

  • lazy declaration / Lazy declaration
  • lazy evaluation / Lazy declaration
  • linearization / Linearization
  • linearized hierarchy / Linearization
  • ListBuffer / ListBuffer
  • literals
    • about / Literals
    • integer literals / Integer literals
    • floating point literals / Floating point literals
    • boolean literals / Boolean literals
    • character literals / Character literals
    • string literals / String literals
    • symbol literals / Symbol literals
    • tuple literals / Tuple literals
    • function literals / Function literals
  • logical operator / Logical operators
  • looping
    • about / Looping
    • for loop / The for loop
    • while loop / The while Loop
    • do while loop / The do while loop

M

  • matchers / Matchers
  • methods
    • about / Methods, Functions versus methods
    • versus functions / Functions versus methods
    • usage, determining / Methods or functions?
  • mutable collections / Immutable and mutable collections

N

  • non-value types / Methods

O

  • objects
    • using, as singletons / Objects as singletons
  • Observables
    • hot observables / Reactive extensions
    • cold observables / Reactive extensions
    • creating / Creating Observables
  • OneForOne
    • versus AllForOne strategy / OneForOne versus AllForOne strategy
  • operators
    • about / Operators in Scala
    • arithmetic operators / Arithmetic operators
    • relational operators / Relational operators
    • logical operators / Logical operators
    • bitwise operators / Bitwise operators
    • operator precedence / Operator precedence
  • Option type
    • about / Option type
    • using / Using the Option way

P

  • packaging
    • about / Packaging and importing
    • package statements / Package statements
    • multiple package statements / Multiple package statements in a file
    • nested package statements / Nested package statements
    • package statements, chaining / Chaining package statements
    • packages, importing / Importing packages
  • parallel collections
    • about / Parallel collections in Scala, Parallel collections
    • URL / Parallel collections in Scala
    • ParArray / ParArray
    • ParVector / ParVector
  • parameterized constructor / Default and parameterized constructors
  • parameterized type
    • versus abstract type / Abstract versus parameterized types
  • parametric polymorphism / Why so serious about types?
  • partial functions / Partial functions
  • partially applied functions / Partially applied functions
  • pattern matching
    • about / Pattern matching, Pattern matching
    • types / Different ways we can pattern match
    • variable, matching / Matching a variable
    • constant, matching / Matching a constant
    • constructor, matching / Matching a constructor
  • postStop / The preStart and postStop hooks
  • pre-emptive multitasking / Understanding processes and threads
  • preStart / The preStart and postStop hooks
  • primitive types / Data types
  • process identifier (pid) / Understanding processes and threads
  • Props / Props

R

  • ranges / Ranges
  • raw interpolator / The raw interpolator
  • reactive extensions / Reactive extensions
  • reactive programming / Reactive programming
  • ReactiveX
    • URL / Creating Observables
  • recursion
    • about / Recursion
    • limitations / Limitations of recursion
    • functions, writing / The ideal way to write recursive functions
  • relational operators / Relational operators
  • rich methods / Wrapper classes
  • root collection
    • versus immutable collection / Differences between the root and immutable collections
  • root guardian / Understanding the Actor system
  • RxScala
    • about / React to RxScala
    • Observables, creating / Creating Observables

S

  • Scala
    • about / Introduction to Scala
    • programming paradigm / A programming paradigm
    • object-oriented, versus functional paradigms / Object-oriented versus functional paradigms 
    • multi-paradigm / Scala is multi-paradigm
    • advantages / Scala advantages
    • executing, on JVM / Runs on JVM
    • URL / Type is the core
    • asynchronous programming, versus parallel programming / Asynchronous versus parallel versus concurrent programming
    • asynchronous programming, versus concurrent programming / Asynchronous versus parallel versus concurrent programming
    • parallel programming, versus concurrent programming / Asynchronous versus parallel versus concurrent programming
    • working with / Working with Scala
    • Java, installing / Java installation
    • SBT, installing / SBT installation
    • REPL / Scala REPL
    • IDEs / Scala IDEs
    • program, executing / Running our first program
  • Scala, advantages
    • executing, on JVM / Runs on JVM
    • syntax / Super smart syntax
    • object-oriented programming, using / Best of both worlds
    • functional programming, using / Best of both worlds
    • type, defining / Type is the core
    • concurrency / Concurrency made easy
    • asynchronous code / Asynchronous code
    • designing, for frontend / Now available for the frontend
    • smart IDEs / Smart IDEs
    • extensive language / Extensive language
    • online support / Online support
  • Scala.js / Now available for the frontend
  • Scala API documentation
    • URL / Option type
  • Scala collection
    • used, for problem solving / Motivation
  • ScalaMock / ScalaMock – a native library to mock objects
  • Scala program
    • exploring / What is underneath a Scala program?
  • Scala REPL
    • references / Scala REPL
  • ScalaTest
    • about / ScalaTest
    • setting up / Setting up for testing
    • used, for applying style / Testing in style using ScalaTest
    • assertions / Assertions
    • matchers / Matchers
  • sealed traits / Sealed traits
  • Simple Build Tool (SBT)
    • installation / SBT installation
    • URL / SBT installation
  • s interpolator / The s interpolator
  • stackable modifications / Traits as stackable modifications
  • streams / Streams
  • StringBuilder / StringBuilder
  • String Interpolators
    • about / String Interpolators
    • s interpolator / The s interpolator
    • f interpolator / f Interpolator
    • raw interpolator / The raw interpolator
  • string literals / String literals
  • subtypes / Scala's class hierarchy
  • symbol literals
    • about / Symbol literals
    • URL / Symbol literals

T

  • tail call optimization / Tail call optimization
  • tell method
    • versus ask method / The tell versus ask versus forward method
  • Test-Driven Development (TDD)
    • about / The why and what of TDD
    • process / The process of TDD, Step 4 - repeat steps 1 to 3
    • scenario / Scenario
    • Behavior driven development (BDD) / Behavior driven development (BDD)
  • trait mix-ins
    • about / Traits as mix-ins
    • using, as composable mix-ins / Traits as composable mix-ins
    • as composable mix-ins / Traits as composable mix-ins
    • using, as stackable modifications / Traits as stackable modifications
  • traits / Abstract classes and traits, Traits, Another way around - generic classes and traits
  • traversable
    • about / Hierarchy of collections in Scala, Traversable
    • additions / Traversable
    • transformations / Traversable
    • conversions / Traversable
    • copying / Traversable
    • information retrievals / Traversable
    • element retrievals / Traversable
    • sub collections / Traversable
    • folding / Traversable
  • tuple literals / Tuple literals
  • type-classes / Type-classes
    • creating / Type-classes ahead!
  • type bounds / Type bounds
  • type erasure / Type erasure
  • type inference / Super smart syntax, Type inference
  • type parameter
    • about / Option type
    • names, using / Type parameter names
  • type parameterization / Type parameterization, Here comes type parameterization
  • types
    • defining / Why so serious about types?

U

  • user guardian / Understanding the Actor system

V

  • val keyword
    • using / Vals and vars
  • value types / Data types
  • variance annotation / Type erasure
  • var keyword
    • using / Vals and vars
  • vector / Vector
  • view / Scala's class hierarchy
  • visibility rules / Visibility rules

W

  • while loop / The while Loop
  • wildcard pattern / Pattern matching
  • Wrapper classes / Wrapper classes
lock icon The rest of the chapter is locked
arrow left Previous Chapter
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at €14.99/month. Cancel anytime}