Comment by wging

Comment by wging 5 hours ago

2 replies

One nice way to do things, if you can get away with it, is to model the actions your application takes explicitly, and pass them to a central thing that actually handles them. Then there can be one place in your code that actually needs to understand whether it's doing a dry run or not. Ideally this would be just returning them from your core logic, "functional core, imperative shell" style.

WCSTombs 5 hours ago

I totally agree with both this and the comment you replied to. The common thread is that you can architect the application in such a way that dry vs. wet running can be handled transparently, and in general these are just good designs.

  • IgorPartola 4 hours ago

    That’s what I prefer as well. A generation step and an execution step where the executor can be just a logger or the real deal.