On Thu, Jul 18, 2024, at 7:12 AM, Nicolas Grekas wrote:
>> Otherwise, I'm quite looking forward to this.
>
> 🤞
Another thought that occurred to me. Given how lightweight it *looks* to be (may not actually be,
but looks it), how much overhead would there be to having a compiled DI container that is lazy by
default? Just make everything lazy with a fairly standard initializer or factory, unless a specific
case says you shouldn't. That way you can use optional dependencies in a constructor pretty
much at will with no overhead of needing to create a chain of dependencies as a result.
Would that be a bad idea for some reason, or would it actually work?
(This doesn't really affect my vote, more just a thought that came up.)
--Larry Garfield