The Scala Specialists

Books, videos, training, and mentoring... everything you need to excel.

Latest from the Blog

Newsletter 10: Conferences, Cats, and Robots from the Future

Hi everyone,

We’ve had a heatwave in London this week with highs of over 30 Celsius (unusually toasty for the rainy UK). To celebrate, let’s pull out our deckchairs, place our knotted handkerchiefs on our heads, and dive into the latest news from the Underscore Newsletter.

This month we’re focusing on conferences: Scala Exchange is just around the corner, the videos from Scala Days are out, and we’re doing some advanced Scala training at Scala World. Plus some blog posts about cats and robots… this is the internet, after all!

Annihilators in Scala: An Example of Type Class Design

In this post I want to explore the design of a type class solving a problem that came up repeatedly in my current project. It’s fairly general, so rather than diving into the details of the project, I’ll start with a few simple examples:

• integer multiplication is annihilated by zero, in that once zero is introduced the result is always zero;
• set intersection is annihilated by the empty set, in that once the empty set is introduced the result is always the empty set; and
• field dereferencing using the “null-safe” `?.` operator in Kotlin and Coffeescript is annihilated by `null`, in that once a `null` is introduced the result is always `null`.

Keeping Scala Simple

You don’t have to venture far to find people arguing that Scala is a complex language, or that Scala needs to be more opinionated. Luckily I have plenty of opinions, specifically about how to make Scala simpler, and this is something I’ve been espousing in my recent talks at Scala Days SF and Amsterdam (slides here).

The problem with talking about simplicity is that it becomes one of those things like “good art” that’s defined as “I know it when I see it.” This provides no guidance. We need more precision. In this blog post I want to discuss complexity from three different angles and give concrete recommendations for creating simple Scala code.

Towards Browser and Server Utopia with Scala.js

At Scala Days 2015 in Amsterdam I talked about Scala.js, and in particular focussed on the great interoperability with JavaScript. This post gives additional links if you want to dig deeper.