I read that and the followup. It’s good writing but I slightly disagree. Imperative is actually a closer mathematical formalism for some things.
I find imperative better for expressing state machines. I find declarative better for backtracking.
You can write a state machine with just a loop, an assignable, and conditions. Writing state in prolog is irritating.