4 ms·
Yep, this is pretty much it, except I want the type system to let me know if "methodThatLogsThings" makes it all the way to the top of the call stack without sa
by default-kramer 8y ago
Yep, this is pretty much it, except I want the type system to let me know if "methodThatLogsThings" makes it all the way to the top of the call stack without satisfying the LOG parameter. C# doesn't do that, but I think a theoretical version of C# could - just stick the implicit dependencies into an attribute on each method. For example, the compiler inserts an attribute like:
[ImplicitDependency(LOG)]
void methodThatLogsThings()
Which would cascade up the call hierarchy until it gets satisfied.