While my main programming language at work is now Rust, I come from a Haskell / Scala background with a love for functional programming.
I started several open-source projects, like specs2 in Scala for testing and the suite of "registry" libraries in Haskell to help with the graceful evolution of large code bases.
Programming with functions is great. However, when growing large applications, programming with _modules_ is even better. And, at scale, being able to easily modify the graph of modules becomes essential. This is exactly what an effective dependency injection system should provide! Unfortunately, many FP languages do not support dependency injection out of the box.
This talk will first present the criteria for what makes a given dependency injection system effective.
It will then show how to implement such a system for a language like Unison.
Unison is a functional programming language with no support for meta-programming and limited support for abstraction; it only provides an effect and handler type system called "abilities".
We will see how we can implement our own dependency injection system with abilities and finally list the programming languages features which could help us to improve that system.