Northeast Scala Symposium
2023

Kathryn Frid

A long time enthusiast for type level and generic programming in Scala. A few years back worked on getting a decent chunk of Shapeless 2 ported to Scala 3 PR as part of my Google Summer of Code project (though sadly it is blocked by Scala 3 bugs). Since then I have worked on developing perpsective further, and writing my master's thesis about it, and the ideas it provides. A master thesis I recently finished and got a grade of A for.

perspective: Generic programming using higher kinded data

Abstract - perspective demonstrates a new way of doing generic programming that is intuitive, type safe, and extensible. perspective attains simplicity by using features like first-class typeclasses and higher kinded data to express its transformations.

Generic programming in Scala is found everywhere. However, doing generic programming using libraries like shapeless or Scala 3's Mirror can often feel like a struggle against obscure or unhelpful compiler errors, slow compile times, unsafe and untyped code, or tons of boilerplate. [perspective](https://github.com/Katrix/perspective) sets out to improve the situation in this area. By using features like first-class typeclasses and higher kinded data, perspective expresses generic programming in much the same way as a developer might transform a `List` of values, using functions much like `map`, `map2`, `foldLeft` and for more complex cases, `tabulate` and `apply`. The talk goes over how one could build their own version of perspective, from simple examples on `List`, to going over `perspective`'s inline code generation features. This talk is based on my master's thesis [Generic programming using Higher Kinded Data](https://bora.uib.no/bora-xmlui/bitstream/handle/11250/3073826/Generic-programming-using-Higher-Kinded-Data.pdf).