From Runtime Explosions to Compiler Checked Simplicity · paul-samuels.com
paul-samuels.com·5d·
Discuss: Hacker News
⚙️Query Compilers
Preview
Report Post

From Runtime Explosions to Compiler Checked Simplicity

21 Dec 2025

When I’m solving problems I rarely move in a straight line. I tend to circle the goal, trying a handful of bad or awkward ideas before something clicks. With experience those loops get shorter, but they never really go away.

This post is about one of those loops: a small problem in some of our KSP generated code. I’ll walk through a few iterations of the solution and end with a much simpler approach that let the compiler do the hard work instead of us.


The problem

We have some KSP (Kotlin Symbol Processor) code that generates helper functions for routing within our application. Inside the generated functions we were blindly taking in arguments and attempting to serialize them with kotlinx.serializat…

Similar Posts

Loading similar posts...