3 ms·
Depending on language if you have first class functions you could also do: logger.write(computestuff); Or for parameterized functions: logger.write(() =>
by meheleventyone 8y ago
Depending on language if you have first class functions you could also do:
logger.write(computestuff);
Or for parameterized functions:
logger.write(() => computestuff(a, b, c));
Then all that logging policy stuff can live with the logging and doesn't need to be checked explicitly throughout the codebase.