Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

This pattern has several other advantages that are worth mentioning:

- You can attach the plan to your Change Management, both for documentation and approval.

- You can manually edit the plan.

- The plan can be processed by other tools (linting, optimizations).

- The "complexity" of the pair planner+executor is often lower than a monolithic algorithm (above a certain size).

- Having a side-effect-free planner makes testing so much easier.

The big downside, of course, is that you're building a VM. You'll have to design operations, parameters, encoding. And stacktraces will make much less sense.

My rule of thumb is to use plan-execute for scripts that combine business logic with destructive operations or long runtime.



Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: