Hacker News new | ask | show | jobs
by kchamplewski 2337 days ago
> when you can't toss a printf debug or log statement into a function without changing function signatures all the way up

But you absolutely _can_ do this in Haskell.

Sure, it's considered very unsafe and shouldn't be used in production, but for printf debugging it's fine.

Admittedly, production-ready logging requires type signature modification, but if you subscribe to Haskell's idea that side-effects should be reflected in type signatures, then I don't see that as excessive.

1 comments

Debug.trace is handy and horrifying indeed :)