The Scala team continues to refine Scala 3, fixing bugs, refining existing features, and introducing some experimental features for Scala 3.1. Here are a few highlights.

Green light, © 2021, Dean Wampler

Scala 3.0.1

This patch release mostly fixes bugs and makes small refinements that don’t impact the book’s contents, with two exceptions I’ll discuss here.

Simplified given Syntax

In Scala 3.0.0, if you want to declare a given for a class with no refinement required (i.e., defining an abstract…

During my recent trip to the Ruby Mountains in Nevada, I tried out the inexpensive and compact Move Shoot Move star tracker. This isn’t a full review, just my initial impressions, as I didn’t have a lot of time to try it out (for reasons I’ll mention below).

What Is a Star Tracker?

Here is the MSM setup for star tracking I used (recreated in the lab!):

Ready for action…

A star tracker rotates the attached camera or telescope to continue pointing at the same part of the sky, if properly aligned! This allows for much longer exposures without movement of the objects in the sky. …

I just purchased the Syrp Genie Micro and several of their motion control devices. You can see the Micro below mounted in my camera’s hot shoe.

The cable combo that worked.

The compatibility list says the Syrp Genie Micro and Genie Mini II can control the Sony A7RIV, but I had a little trouble getting it to work. Hence, this quick post discusses what I learned.

Updating Firmware

The first thing you do with any new Syrp product is connect to it with the iOS or Android Syrp…

Six Vista Towers, Chicago (from Navy Pier), © 2021, Dean Wampler

Last time I introduced one of the new metaprogramming features in Scala 3, the inline keyword and how it affects source code. The example I used also contained a macro definition, using quoting and splicing. This post introduces those concepts.

Here is the previous example, which ensures that an invariant holds before and after a block of code is executed.

Quotation and splicing are the key components…

From Teh Interwebs

I haven’t blogged yet about the new metaprogramming system in Scala 3, so let’s start that now. First, let’s look at the new inline keyword, which causes the compiler to “inline” the decorated code.

“Inlining” means…

Scala 3.0.0 is now final!

After 8, © 2020, Dean Wampler

After 8+ years of effort, Scala 3 was officially released this week. This blog post on the Scala language website provides some details, along with a cool visualization of the evolving git tree over that time.

Programming Scala, Third Edition is almost finished, too. We’re in the final production steps with a planned ebook release early in June. Print copies will be available a few weeks later.

Looking for the perfect wedding gift this Spring? You’re welcome! You can preorder on Amazon, Powells, and other vendors. The book page has more links.

I’ll return with more posts about Scala 3 features soon.

Late in the Scala 3 development process, a new type scala.Matchable was introduced to fix a loophole in pattern matching. This post discusses that loophole, how Matchable fixes it, and implications of this change.

Lincoln Park Education Pavilion Detail, © 2021, Dean Wampler

Arrays in Scala have always been Java arrays, which are mutable. Scala 3 introduces a new immutable wrapper around arrays call…

For a long time, Scala has supported a useful “trick” called infix operator notation. If a method takes a single argument, you can call it without the period after the instance and without parentheses around the argument. This post describes changes in Scala 3.

Spring Equinox Sunset, Ohio St. Chicago, ©2021, Dean Wampler, All Rights Reserved

For example, if I have a Matrix class and a + method to add matrices, element by element, I can write matrix1.+(matrix2) or use the less cluttered and more intuitive syntax, matrix1 + matrix2. The intention was to support true operators, like + in intuitive contexts like this. …

Type lambdas are the type analog of “value lambdas”, also known as functions 🤓. This post explores them. The discussion naturally leads to the new ability to parameterize the types of functions, which was previously only supported for methods. While I’m at it, I’ll mention another method feature that’s now supported for functions, dependent function types.

Sofitel in the Snow, ©2021, Dean Wampler, All Rights Reserved

Type Lambdas

Let’s suppose we wanted to…

(With apologies to Bob Dylan.)

This post covers how some uses in Scala 2 of the underscore, _, are being replaced with alternatives. The contexts include import and the new export statements and type parameter wild cards. Along the way, I’ll discuss other changes for import statements, the new export statement, and a syntax change for repeated parameter lists (a.k.a., variable argument lists).

Cork Trivet from Queork, ©2021, Dean Wampler, All Rights Reserved

Dean Wampler

The person who’s wrong on the Internet. ML/AI and functional programming enthusiast at Domino Data Lab. Speaker, author, aspiring photographer.

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store