I find following Christ easier if I think recursively, not iteratively.
Earlier this year I interviewed for a faculty position at Brigham Young University. Although they and I agreed the position was not the right one for me, the interview process was very enjoyable. One aspect of that was being asked to teach a room of Christians about recursion. That let me use an example of recursion that I find particularly compelling:
That is an example of tail recursion, and tail recursion can be easily rewritten as a loop, in this case an infinite loop since it was infinite recursion:
There is something about the loop version of this particular example that seems much less hopeful and achievable than the recursive version. It puts the emphasis in the wrong place: the infinite repetition gets emphasized and the day-by-day nature of life is almost lost. You never leave the loop; nothing changes; it looks so… hopeless. The recursion, on the other hand, emphasizes the one-day perspective and, while semantically identical in practice, somehow makes the fact that each new day is different more visible.
I wish everyone spoke code. It is such a powerful set of languages, filled with nuance and connotation, a family of languages that, by design, express ideas that are difficult or impossible to express in other languages.
Looking for comments…