/ tags/ Scala
Scala 3 Mirrors give you a type's shape, but not its custom field names, default values, or annotations, and they refuse value classes outright. M&DE derives an enriched mirror that carries all of…
Kotlin's DeepRecursiveFunction turns deep recursion into a heap-allocated trampoline while keeping direct-style code, built on suspend functions. This post explains why that works, then builds a…
How to debug Scala 3 macros: profiling the compiler, print-debug helpers for types and ASTs, and attaching a JVM debugger to the compiler from Mill, sbt, scala-cli, VS Code or IntelliJ.
How to prove at compile time that a Scala 3 tuple contains only elements of a single type, using match types, opaque types, and clause interleaving.
A complete guide to setting up a Scala library project with scala-cli — formatting, testing, code coverage, Maven Central publishing, GitHub Actions CI, and Scaladoc deployment.
Automating type class derivation in Scala 3 using the Mirror API and compiletime utilities — replacing complex Scala 2 macro code with readable, type-safe compile-time logic.