A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from http://docs.scala-lang.org/scala3/new-in-scala3.html below:

New in Scala 3 | Scala Documentation

The exciting new version of Scala 3 brings many improvements and new features. Here we provide you with a quick overview of the most important changes. If you want to dig deeper, there are a few references at your disposal:

What’s new in Scala 3

Scala 3 is a complete overhaul of the Scala language. At its core, many aspects of the type-system have been changed to be more principled. While this also brings exciting new features along (like union types), first and foremost, it means that the type-system gets (even) less in your way and for instance type-inference and overload resolution are much improved.

New & Shiny: The Syntax

Besides many (minor) cleanups, the Scala 3 syntax offers the following improvements:

Opinionated: Contextual Abstractions

One underlying core concept of Scala was (and still is to some degree) to provide users with a small set of powerful features that can be combined to great (and sometimes even unforeseen) expressivity. For example, the feature of implicits has been used to model contextual abstraction, to express type-level computation, model type-classes, perform implicit coercions, encode extension methods, and many more. Learning from these use cases, Scala 3 takes a slightly different approach and focuses on intent rather than mechanism. Instead of offering one very powerful feature, Scala 3 offers multiple tailored language features, allowing programmers to directly express their intent:

Say What You Mean: Type System Improvements

Besides greatly improved type inference, the Scala 3 type system also offers many new features, giving you powerful tools to statically express invariants in the types:

Re-envisioned: Object-Oriented Programming

Scala has always been at the frontier between functional programming and object-oriented programming – and Scala 3 pushes boundaries in both directions! The above-mentioned type system changes and the redesign of contextual abstractions make functional programming easier than before. At the same time, the following novel features enable well-structured object-oriented designs and support best practices.

Batteries Included: Metaprogramming

While macros in Scala 2 were an experimental feature only, Scala 3 comes with a powerful arsenal of tools for metaprogramming. The macro tutorial contains detailed information on the different facilities. In particular, Scala 3 offers the following features for metaprogramming:

If you want to learn more about metaprogramming in Scala 3, we invite you to take our tutorial.

Contributors to this page:

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4