|
|
|
|
|
by joel_ms
2681 days ago
|
|
>To be honest, I find the idea of passing a parameter to Log() (whether it's the value or the function) that your don't actually want logged, so that you can shoehorn two statements into an expression, abhorrent. You've basically reimplemented Haskell's Debug.Trace[0] :) The difference is of course that Haskell doesn't really have statements in the same way that C# does, so in Haskell it's nescessary to turn the log/trace-function into an identity function after you've applied the message-string. I agree that it is ugly, and in any serious project I would use a proper logging setup, but I almost feel like the ugliness is a feature not a bug. It's like an extra cost when doing debug-by-print, which at least seem to keep me more mindful about cleaning up after myself. [0] http://hackage.haskell.org/package/base-4.12.0.0/docs/Debug-... |
|