Distilling Refined Types using Scala 3

Introduction Before introducing refinement types, let’s suppose you are a library author, and you have a tricky situation to solve. One of your library objects can refer to other objects by their name. Very abstract don’t you think ? But when you start to look around, a lot of these cases exists. Relational Tables (columns registered in a table object) Forms RPC handle collections HTTP Routes Two main problems arise when using these : ...

December 10, 2024 · Valentin Bergeron

Field Maps

Introduction Let’s talk about a kind of common issue in programing. Imagine you have a large form to fill, or a SQL table to select column from, or really any type of data where you are interested by selecting subsets of its atomic components (like form results, or SQL columns). I call this data structures field maps data, and let’s see how we can implement the using the power of the Scala 3 language. ...

April 21, 2023 · Valentin Bergeron