Skip to content

Instantly share code, notes, and snippets.

@monadplus
Last active January 14, 2020 09:52
Show Gist options
  • Save monadplus/eab1fb5daa17124ee7816193ccd9f9a3 to your computer and use it in GitHub Desktop.
Save monadplus/eab1fb5daa17124ee7816193ccd9f9a3 to your computer and use it in GitHub Desktop.
Why logging is an effect we want to track

Why logging is an effect we want to track

P. Oscar Boykin>
I love functional programming. I’m still very skeptical that logging is an effect we want to track. 
Logging is for observability. Removing all logging shouldn’t change the semantics of the program. 
By using an effect we change the types of many logged functions.
Gabriel Gonzalez>
It is worth tracking if you care about preserving the number of times something is logged and 
the order in which things are logged.  Otherwise an aggressive compiler trying to inline, 
speculatively evaluate, or eliminate common sub-expressions could mess with log output
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment