
Zach Michaelov
Co-founder & CTO, Annex Risk
The talk
Functional Underwriting in Scala
As a provider of personal lines insurance, Annex Risk is responsible for maintaining a large set of underwriting rules across multiple product lines. Underwriting rules can be arbitrarily complex and often evolve over time. Many teams handle this with a rules engine or a DSL stored in a database. We went the other way: our rules are plain Scala.
This talk explores how we model underwriting rules as an interval map, where each range holds a function object implementing the rule in effect for a particular time window. Thin Scala-friendly constructors and builders reduce a new rule version to a few lines of code. Because it’s just Scala, we get type safety, the compiler, IDE support, and all our existing tooling for free, and source control gives us a complete audit history.
About Zach