Scala 3 Released With Major Changes
Tuesday, 29 June 2021

Scala 3 has been released. The new version has been eight years in development, and according to the developers is a complete overhaul of the Scala language. Many aspects of the type-system have been changed, meaning that type-inference and overload resolution are much improved.

Scala combines object-oriented and functional programming in one concise, high-level language. Scala is a statically typed, object-oriented, functional language, which runs on the JVM and has some interesting parallel processing constructs based on the actor model. An actor is essentially an object that runs concurrently and engages in message passing.

scala

Scala was released publicly in 2004 as an open source project under the BSD licence and Version 2 was released in 2006. In January 2011  the Scala team was awarded a grant of 2.3 million euros over 5 years to implement parallel processing features which allowed the team to expand.

 

The developers have worked on the entire Scala language, starting with the type system. The changes to this enable new features such as union types, and also mean that the type-system is less obtrusive and type-inference and overload resolution are much improved.

Alongside the improved type inference, the Scala 3 type system has new features including redesigned enums that blend well with case classes and form the new standard to express algebraic data types; opaque types that can hide implementation details; and intersection and union types.

There are also new dependent function types, polymorphic function types. and type lambdas.

The new release also has a new “quiet” syntax for control structures like if, while, and for. The quiet syntax doesn't rely on enclosing the condition in parentheses, and also allows to drop parentheses or braces around the generators of a for-expression. The new keyword is now optional, and optional braces allow for "a distraction-free, indentation sensitive style of programming".

The developers have also worked on 'contextual abstractions'. The development team says that one underlying core concept of Scala has been to provide users with a small set of powerful features that can be combined. 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. Examples include abstracting over contextual information by using clauses so programmers can abstract over information that is available in the calling context and should be passed implicitly; and providing Type-class instances to define the canonical value of a certain type.

Scala 3 is available for download now from the Scala website.

scala

 

More Information

Scala Website

Related Articles

Scala.js Exits Experimental Stage  

Scala 2.11 Released 

To be informed about new articles on I Programmer, sign up for our weekly newsletter, subscribe to the RSS feed and follow us on Twitter, Facebook or Linkedin.

Banner


Swimm Releases Copilot Extension For Documentation
03/12/2024

Swimm, best known for its AI-driven software documentation tools, has announced an extension for GitHub Copilot. The Swimm team says the extension means developers using GitHub Copilot Chat can turn C [ ... ]



AI At edX With 30% Savings
13/12/2024

edX is offering a 30% discount on selected courses and program bundles until December 19th. We look at  AI-related certifications that could boost your resume in 2025.


More News

espbook

 

Comments




or email your comment to: comments@i-programmer.info