News for hackers. Stuff that matters.
Re:Dependency Inversion in C Using Function Pointers by irahul on Monday July 09, 2012 @05:45AM (#4217369)
Injection by parameters(setters, constructor and simple params) has been in use much before DI became a fad.

    void qsort(void *base, size_t nmemb, size_t size,
               int(*compar)(const void *, const void *))
Here, `compar` is being injected. When it is needed, it's sweet. But when you start going down Java's way(i.e the way Java frameworks (over)do it), it's irritating. The point of DI is to inject dependencies rather than hard coding them. That doesn't mean you have to use IoC containers, or you have to inject everything.
Re:Dependency Inversion in C Using Function Pointers by hendzen on Monday July 09, 2012 @09:03AM (#4217902)
Curious to hear which Java DI frameworks you dislike. I've used Google Guice before on a large project and I found it to be great: it doesn't get in your way and it makes your code a lot more modular and testable.