LOADING

Can we have the Standard Library for Macros?

Do you like it when compiler generates the boring code for you? Fast, mundane, boring-but-error-prone code? Do you need to implement such a code generator yourself? Have you found out that Shapeless/Mirrors bend your brain a bit too much?

Mateusz Kubuszok
Senior Scala Developer
About This Talk

Do you like it when compiler generates the boring code for you? Fast, mundane, boring-but-error-prone code? Do you need to implement such a code generator yourself? Have you found out that Shapeless/Mirrors bend your brain a bit too much?

Congratulations! You might have a valid use case for writing a macro! Plain-old code with some plain old, vals, defs and if-elses. So, we’re opening up an IDE, looking at the API and… oh, no. It’s so low-level. And error prone. And everyone needs to copy-paste the same utilities… which are handling like 50% of the cases, and for the remaining 50% politely asking you to rewrite your code to something actually supported.

Oh, and if your users are both on Scala 2 and Scala 3 you have to write everything twice. You’d better have some tests written to keep them aligned!At this point, you might reconsider using macros: maybe generate some files as managed source, or get back to Shapeless/Mirrors, or just write the boring and error-prone code by hand?

But it doesn’t have to be this way. We can have a standard library for macros that makes simple things simple, and hard things (at least) possible. And we can design it in such a way, that most of the code could be shared between Scala 2 and 3.

And this talk will show you how.

more great talks

Might Be Interesting

Day 2
  —  
2:35 pm
arrow pointing right icon

Scala and TypeScript Synergy: Developing a real-time collaborative text editor

In this presentation, I will demonstrate how we leveraged the strengths of Scala and TypeScript to develop a collaborative text editor that meets the strictest standards for security, performance, and real-time collaboration.

Day 1
  —  
9:35 am
arrow pointing right icon

The world after Scala 3.9 LTS

In this talk, I will introduce the highlights of what to look forward to in Scala 3.9 LTS, as well as how to think about the upcoming new release.

Day 2
  —  
9:35 am
arrow pointing right icon

Flexible Modeling: Keeping Your Domain Pure with Scala 3

In this talk, we will walk through a concrete example of a boilerplate-heavy domain. By replacing common Scala 2 workarounds with Opaque Types, Extension Methods, Enums, and Union Types, we will demonstrate how to achieve a strictly typed, decoupled architecture without the noise.

Day 1
  —  
2:00 pm
arrow pointing right icon

The Concurrency Triangle: Scala Fibers, Java Virtual Threads, and Kotlin Coroutines

Scala Fibers, Java Virtual Threads, and Kotlin Coroutines - this talk shows how this elegant solution manifests at three different abstraction levels.

Day 1
  —  
8:00 pm
arrow pointing right icon

Scalar Afterparty

Don't miss out on this opportunity to connect with Scalar community and create lasting memories!

Day 1
  —  
11:15 am
arrow pointing right icon

Cyfra: Scala on GPU

Learn how to accelerate Scala code by orders of magnitude with Cyfra.

See All Events
Join us!

We're looking for amazing speakers.
CFP is open till 10.01.2023

Fill in Call for Papers
location icon

Location

Centrum Konferencyjne POLIN, Poland
stay in touch icon

Follow Us

Contact Us