News for hackers. Stuff that matters.
Re:Logging as a code smell by aranchelk on Sunday January 09, 2022 @11:25PM (#29870610)
Prescriptive example from the article:

userRoles.addMember( p ); RoleAssignedEvent.publish( p, roleName );

Seems to have the exact same risk of divergence.

Depending on the language you can (and I have) used decorators/higher order functions to log the invocation of a function with its name and arguments. Zero risk of divergence there, but it was still logging not some kind of event system. The problem of divergence seems to me to be orthogonal.

There are no comments on this comment yet.