I'd like to see a language with baked in support for dependency injections, so that my functions can take two types of parameters: its "real" parameters, which it needs to perform its function, and "dependencies", that are passed implicitly by the runtime.
Basically, a formalization of Dagger/Guice into a language.
Monadic functional languages have native support for dependency injection and typeclasses/interfaces provide interoperability and easy mocking or alternative implementations with type-checking / propagation of which dependency they are using. (As to avoid mismatching between mocks and a real implementation for example)
This article is just about mocks and doesn't really touch on dependency injection at all, and Haskell simply doesn't have the mechanisms to supply the kind of implicit passing that useful DI requires.
As a part of the language standard / standard library, or as a third party crate? I'm confused how this would work, as as far as I'm aware, making this a language-level feature would require significant changes to the ethos of the language.
There are some examples, e.g. the Bevy ECS doing more or less dependency injection for you (and ensuring against things like aliased mutable references), which is pretty neat.
Edit: I think I like it. It doesn't solve dependency injection like e.g. Guice but the examples given, e.g. providing implementations for traits defined in external crates that take arbitrary state, is compelling.
Basically, a formalization of Dagger/Guice into a language.