Video description
These 65 examples will make this cool-new-kid-on-the-block your steady, reliable friend. Let’s parse that. Scala is cool because it’s all the rage for big data applications, and because it manages to be more sophisticated and elegant than Java. That said, Java is a steady, reliable friend - a language you can depend upon, and in which you can express yourself. These 65 examples will help you trust Scala the way you trust Java. Each is self-contained, has its source code attached, and gets across a specific Scala use-case. Each example is simple, but not simplistic.
What You Will Learn
- Use Scala with an intermediate level of proficiency
- Read and understand Scala programs - including those with highly functional forms - written by others
- Identify the similarities and differences between Java and Scala, and use both to their advantage
Audience
The suitable audience for the course is only if you know Java and are now looking to learn Scala from first principles and if you are interested in learning functional programming concepts as embodied in Scala.
About The Author
:
Table of contents
- Chapter 1 : You, This Course and Us
- Chapter 2 : Introducing Scala
-
Chapter 3 : Expressions or Statements?
- Module Outline - Loops and Conditionals
- Example 9 - Statements v Expressions
- Example 10 - Defining Values and Variables via Expressions
- Example 11 - Nested Scopes in Expression Blocks
- Example 12 - If/Else expression blocks
- Example 13 - match expressions
- Example 14 - match expressions: Pattern guards OR-ed expressions
- Example 15 - match expressions: catch-all to match-all
- Example 16 - match expressions: down casting with Pattern Variables
- Example 17 - for loops can be expressions OR statements
- Example 18 - for loops: 2 types of iterators
- Example 19 - for loops with if conditions: Pattern Guards
- Example 21 - while/do-while Loops: Pure Statements
-
Chapter 4 : Fiber Optic Cabling
- Module Outline – Functions
- First Class Functions: Module Outline – Functions
- Functions v Methods
- Example 22 - Functions are named, reusable expressions
- Example 23 - Assigning Methods to Values
- Example 24 - Invoking Functions with Tuples as Parameters
- Example 25 - Named Function Parameters
- Example 26 - Parameter Default Values
- Example 27 - Type Parameters: Parametric Polymorphism
- Example 28 - Vararg Parameters
- Example 29 - Procedures are named, reusable statements
- Example 30 - Functions with No Inputs
- Example 31 - Nested Functions
- Example 32 - Higher Order Functions
- Example 33 - Anonymous Functions (aka Function Literals)
- Example 34 - Placeholder Syntax
- Example 35 - Partially Applied Functions
- Example 36 – Currying
- Example 37 - By-Name Parameters
- Example 38 – Closures
-
Chapter 5 : Collections
- Module Outline – Collections
- Example 39 – Tuples
- Collections: Example 39 – Tuples
- Example 41 - Simple List Operations
- Example 42 - Higher Order Functions Introduced
- Example 43 - Scan, ScanFold,ScanReduce
- Example 44 - Fold, FoldLeft, FoldRight
- Example 45 - Reduce, ReduceLeft, ReduceRight
- Example 46 - Other, Simpler Reduce Operations
- Example 47 - Sets and Maps
- Example 48 - Mutable Collections, and Arrays
- Example 49 - Option Collections
- Example 50 - Error handling with util.Try
-
Chapter 6 : Classes and Objects
- Module Outline – Classes
- Example 51 – Classes
- Example 52 - Primary v Auxiliary Constructors
- Example 53 - Inheritance from Classes
- Example 54 - Abstract Classes
- Example 55 - Anonymous Classes
- Example 56 - Type Parameters
- Example 57 - Lazy Values
- Example 58 - Default Methods with apply
- Example 59 – Operators
- Example 60 - Access Modifiers
- Example 61 - Singleton Objects
- Example 62 - Companion Objects
- Example 63 – Traits
- Example 64 - Case Classes
- Example 65 - Self Types
Product information
- Title: Learn By Example: Scala
- Author(s):
- Release date: December 2017
- Publisher(s): Packt Publishing
- ISBN: 9781788993005
You might also like
book
Get Programming with Scala
The perfect starting point for your journey into Scala and functional programming. In Get Programming in …
video
Functional Programming in Scala video edition
"Leads to deep insights into the nature of computation." From the Foreword by Martin Odersky, Creator …
book
Functional Programming in Scala
Functional Programming in Scala is a serious tutorial for programmers looking to learn FP and apply …
book
Scala Cookbook
Save time and trouble when using Scala to build object-oriented, functional, and concurrent applications. With more …