Udemy
    •  
    •  
    •  
    •  
    •  
    •  
    •  
    •  
Turn what you know into an opportunity and reach millions around the world.
Learn More
Your cart is empty.
Keep shopping
Scala 3: Just What You Need
Rating: 4.5 out of 5(46 ratings)
348 students

Scala 3: Just What You Need

Fully updated for Scala 3, Zero to Hero, Just the skills you need in just the language you want.
Created byDick Wall
Last updated 3/2023
English
English [Auto],

What you'll learn

  • Scala Language Programming
  • Scala 3 New Syntax and Features
  • Scala Core Libraries, Including Collections and Futures
  • Scala Types, Traits, Pattern Matching, Functions
  • Practical Functional Programming in Scala

Course content

16 sections353 lectures16h 27m total length
  • Module 1 - Overview0:17

    Explore the basics of Scala 3 by getting started with SBT and the REPL, using Visual Studio Code worksheets, and writing simple conditionals and loops.

  • Module 1 - Agenda1:16

    Explore the scala repl, sbt, and basic variables, types, functions, conditionals, try-catch, and loops, then run worksheets using visual studio code and complete exercises and tests.

  • Module 1 - Download Exercises
  • Module 1 - The Scala REPL1:57

    Explore the Scala repl, its command-line usage, and type inference, learn to load scripts, quit, and inspect expression types with colon help.

  • Module 1 - SBT2:03

    Run scala from the sbt build tool and access the repl via the sbt console, switching versions by updating build.sbt.

  • Module 1 - First Time in the REPL2:21

    Learn how to exit the Scala 3 REPL, understand read-evaluate-print loop behavior, complete versus incomplete expressions, and use indentation to signal multi-line, significant whitespace.

  • Module 1 - Vals and Vars1:36

    Learn how vals in Scala are immutable names assigned to values, unlike vars which can change; understand type safety and why functional style favors vals.

  • Module 1 - Hiding Vals0:50

    Explore how the Scala REPL can hide an old val by redefining a new one in a new scope, revealing how scope controls visibility without reassignment.

  • Module 1 - Scopes in the REPL1:57

    Explore Scala repl by creating brace-enclosed blocks, shadowing outer values, and watching inner scopes hide and reveal outer ones when closed.

  • Module 1 - Scala and Types1:06

    Explain how Scala assigns a type to every variable, and how var x = 10 becomes an integer that cannot become a double. Show explicit typing versus type inference.

  • Module 1 - Method/Function Definitions3:02

    Learn how to define methods with def in Scala, require parameter types, and optionally a return type. Use an add example to show parameter type inference limits.

  • Module 1 - If Expressions3:10

    Demonstrate how if expressions return values in Scala 3, compare them to statements in other languages, and learn the new, cleaner syntax using then and optional parentheses.

  • Module 1 - Functional Style5:01

    See how Scala treats if as an expression, highlighting hybrid functional style and avoiding side effects and vars. Understand that the last expression yields the value, with return discouraged.

  • Module 1 - Try..Catch..Finally Expressions3:25

    Learn how Scala uses try, catch, and finally as expressions to handle exceptions, return values, and always run finally for side effects such as closing files.

  • Module 1 - Simple Loops5:51

    Explore Scala 3 exception handling with try, catch, and finally, including arithmetic exceptions, and learn the single true looping construct while do, plus string interpolation and the unit type.

  • Module 1 - Do..While2:19

    Examine the do while concept versus a while loop, and show how Scala can simulate do while by placing the body in the while block, with unit representing doing nothing.

  • Module 1 - Using the Worksheet6:54

    Explore using worksheets in VS Code to run interactive Scala scripts, replacing the REPL, with instant results, live errors, and features like hover docs and hotlinking.

  • Module 1 - Installing the Tools0:17
  • Module 1 - Exercises8:24

    Run the first Scala exercises by loading scripts in VS Code and compiling with SBT; then build a timetable worksheet with nested while loops to produce a 25-line times table.

  • Module 1 - Exercises Complete

Requirements

  • Programming skills in at least one other programming language is recommended

Description

A complete introduction to the Scala 3 language teaching you all you need to know in order to use it on a daily basis.


Scala 3 is a new version of a beloved functional hybrid language, one with many improvements over Scala 2. This course has been completely re-written for Scala 3, to introduce the new features, concepts, keywords and syntax. In addition the course exercises have been fully updated and brought to Visual Studio Code and Metals (the meta-language-server) for the hands-on portions of the course.


This course is half theory and half practice. Each subject covered includes worksheet based examples that you can experiment with, and exercises to complete allowing you to practice and reinforce what you have just learned in the theory.


The concepts are taught in a straightforward, simple approach with plenty of coding examples and clear explanations. Your instructor has more than 15 years of experience in Scala programming and more than a dozen years of experience teaching Scala to others.


Scala 3, just what you need, takes its title from two ideas, that the Scala 3 language could be just what you need to solve your programming problems, and that the topics covered are just what you need to quickly become productive in the language while still learning a lot of the theory and best practices surrounding Scala programming.


Come and learn Scala, at your own pace, from an experienced developer and trainer. Have fun while learning, and pick up the skills for using the tools and libraries as well as the core language.


Topics covered include:


  • Language and Syntax

  • Control Structures

  • Classes, Objects, Traits

  • Functions

  • Pattern Matching

  • Case Classes and Enums

  • Packages, Scopes and Importing

  • Inheritance and Scala Type Hierarchy

  • Testing

  • Lists and Collections

  • Java Integration

  • Using Libraries

  • Building Scala with SBT

  • Asynchronous Programming with Futures

Who this course is for:

  • This is a course for programmers looking to learn Scala, and in particular Scala 3. It assumes no knowledge of Scala 3, but does assume that you understand basic programming principles like conditionals and loops. We'll teach you the rest.