In programming, we can make the distinction between declarative / functional and procedural / imperative programming. The distinction is not exact, but nevertheless meaningful.
One major difference is that declarative style tends to make use of recursion in places where imperative style makes use of iteration.
Consider the following (informal) imperative style definition of a subset $X\subset \mathbb N$ given a function $f:\mathbb N \to \mathcal P( \mathbb N)$.
Put $0$ in $X$.
Repeat to infinity: For each $x\in X$, put the elements of $f(x)$ in $X$.
This means that $X$ is not an immutable object, but more akin to a “list” in imperative programming languages. I understand that mathematicians would call $X$ “ill-defined”, but as an imperative style program, this is (the pseudocode of) a perfectly well-defined program.
In general, I know that mathematicians don’t like “mutable” objects, and maybe this is the reason why they don’t like such imperative-style definitions. But I don’t really understand why.
Why do mathematicians consider such “imperative” style definitions bad, or even ill-defined, given that they can be quite intuitive and also well defined as an imperative program?