GithubHelp home page GithubHelp logo

bszwej / scala-3-crash-course Goto Github PK

View Code? Open in Web Editor NEW
35.0 5.0 14.0 38 KB

Scala 3 workshop presenting the top new features of the language.

Scala 100.00%
scala scala3 workshop exercises dotty functional-programming enums intersections union adt

scala-3-crash-course's Introduction

Scala 3 crash course

Join the chat at https://gitter.im/bszwej/scala-3-crash-course

Scala 3 RC3 is already here and we can expect the final release on the 12th of May if no major bugs are found! That's why it's a good timing for playing around and seeing what's there. In this workshop we'll see the most interesting and important features like enums, contextual abstractions (givens, extension methods, type classes, context functions), new types (opaque, unions and intersections). We'll also see what's dropped and what changed. During the exercises, you'll be refactoring Scala 2 to Scala 3 yourself using the new shiny constructs.

This workshop is dedicated to Scala 2 developers and assumes prior knowledge about implicits, ADTs and type classes.

Before the workshop

  1. Checkout this repository
git clone [email protected]:bszwej/scala-3-crash-course.git
  1. Compile with sbt
sbt compile
  1. Import it in your favorite IDE
  • VSCode + metals (recommended)
  • Intellij

Table of contents

  1. Braceless syntax
  2. Enums
  3. Contextual language features:
    • given/using
    • extension methods
    • type classes
    • implicit conversion
    • scoping of given/using
    • contextual functions
  4. Opaque types
  5. Union and Intersection types
  6. The small bits
  7. (In preparation) New kinds of types: type lambdas, match types, dependent functions, polymorphic functions
  8. (In preparation) Type class derivation
  9. (In preparation) Macros

Solutions

Solutions to all exercises can be found in the solutions package.

scala-3-crash-course's People

Contributors

bszwej avatar gitter-badger avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.