Sébastien Doeraene at Scala Days: “When I started Scala.js, little did I know that it would turn into the largest project of my life”

A compiler/runtime systems hacker and a Scala enthusiast, Sébastien Doeraene is best known as the author of Scala.js and as an Executive Director of the Scala Center. He holds a PhD from EPFL, having worked under the supervision of Prof. Martin Odersky, and a master’s degree in computer science engineering from Université catholique de Louvain in Belgium. Fun fact: when Sébastien is not busy coding, he sings in choirs and a cappella groups such as the Ensemble Vocal Évohé, or composes for said choirs.

In advance of his upcoming talk on Scala.js and WebAssembly at Scala Days Lausanne, we spoke to Sébastien about his Scala path, his role at the Scala Center and how Scala.js became the largest project of his life.

What is your most favorite Scala Days story or memory?

I don’t really have one single favorite moment. What I like about Scala Days is meeting all those people whom I get to interact with online, in real life. It’s always nice to meet someone and realize “Oh, you’re @somefamoususername!”, and then later have a better idea of who I’m talking to when I discuss things in the digital space.

What’s your background and what does your current role involve?

I started programming when I was very young, discovered a few programming languages, and eventually realized that what I liked doing was writing compilers and designing languages. For a while, my favorite language was Delphi. Towards the end of my master’s, I discovered Scala and wrote a Scala dialect called Ozma, compiling to Oz and the Mozart virtual machine. Two years later, I started my Ph.D. in Martin Odersky’s lab, with the goal of compiling Scala to JavaScript. I wrote a proof-of-concept in 4 months, and then it took an entire Ph.D. to make it bulletproof.

Since the end of my Ph.D., I’ve been serving the community as an Executive Director of the Scala Center. That involves quite a spectrum of activities, but mostly I would describe the role as being an interface between a lot of parties: Martin’s research team at EPFL, the compiler team at Lightbend, our sponsors/advisory board members, our own team, and the community at large. I am also part of the SIP Committee, which is dedicated to the evolution of the Scala language, and I keep maintaining Scala.js.

What’s the biggest highlight of your career so far?

Scala.js, without a doubt. I am constantly amazed by the level of adoption it got, and by the commitment of the community to maintain a cross-compiling ecosystem as well as Scala.js-specific libraries. When I started Scala.js, little did I know that it would turn into the largest project of my life, be used by tens of thousands of developers worldwide, and make it well into the top-10 of the languages compiling to JavaScript. I am extremely grateful to all the developers who have believed in Scala.js and contributed to its ecosystem because none of that would have happened without them.

Why did you choose Scala and what kind of problems does it solve for you?

As a compiler writer, Scala has a lot to offer to me:

  • Pattern matching and functional transformations are my bread and butter, so I love the functional aspects of Scala.
  • For performance, and in particular for parallel incremental compilation and optimization, I sometimes need an actual (shared) mutable state, which I need to encapsulate as much as possible, so I love the imperative and object-oriented aspects of Scala.
  • During tree transformations, I can accurately carry positions from input trees to transformed trees using an `implicit pos: Position`, so I love the implicit aspects of Scala.

What is the biggest challenge Scala developers are facing today?

In my opinion, our most important challenge is to (re-)discover the blend of functional programming and object-oriented programming that Scala was designed to be. Too often, we tend to each choose one paradigm of writing Scala, and forget or actively fight the advantages that the other paradigms have to offer. This poses several problems, both technical and social:

  • We may overlook solutions that would be very efficient and simple if they belong to a paradigm that we reject.
  • We create animosity in the community when we disregard the opinion of others, which reflects badly on the language and its ecosystem.
  • We try to fit Scala too hard into programming styles that would be better done in other, more specific languages, such as Haskell or Kotlin. We thus fail to highlight Scala’s true strength–its multi-paradigm nature–and therefore lose the marketing battle compared to other languages.

What can help address this challenge?

We should all try to look at the paradigms we don’t use as often with a positive light, and choose the right tool for the right job, at every scale of our applications.

Who should attend your talk at Scala Days and why?

My talk is an overview of the biggest challenges that we face if we want to compile Scala.js to WebAssembly. If you’ve ever had the temptation to ask “But why don’t you just compile Scala.js to WebAssembly to make it fast!?”, this talk is for you.

Whom would you like to connect with at the conference?

Everyone. Although that’s going to be tough. 😉

Don’t miss Sébastien Doeraene and his talk Scala.js and WebAssembly, a tale of the dangers of the sea at Scala Days Lausanne on June 13th. Book your ticket now.

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.