Re:Dependency Inversion in C Using Function Pointers
by kabdib on Monday July 09, 2012 @12:36PM
(#4218966)
I'll add: The times that I've left off a void* context, I've always wanted one later. Just put one there. Honest. Don't think about functions without also thinking about their environments.
(In languages with closures, you'd just use a closure. Passing a void* around is C's meatball way of expressing an execution context).
(In languages with closures, you'd just use a closure. Passing a void* around is C's meatball way of expressing an execution context).