New answers tagged meta-programming
Dagger for Java/Android does that. It sacrifices some runtime magic (like Guice's) to offer an almost completely compile-time codegen experience, including converting most runtime errors to compilation errors. Would be cool in .NET too.
Doing this should not be such a problem. Just run same IoC logic and instead of instantiating the classes, you emit code that does the instantiating. But by doing this, you are removing one huge advantage of IoC : Ability to change how the coponents are composed without having to recompile the whole application. Just by replacing the config, you can have ...
Top 50 recent answers are included