Find Related products on Amazon

Shop on Amazon

The Yin and Yang of Programming

Published on: 2025-07-09 10:31:11

[This is from a paper we’re submitting to the International Conference on Functional Programming (ICFP 2025)] Introduction Recursion and iteration are the Yin and Yang of programming. Conventional languages support both, but tend to favor the Yang – iteration. Java and C, for example, have elaborate while and for statements. But they treat functions as second-class objects that e.g. can’t be returned as results. Python is a bit better. The Yin, we might say, is strong in that one. Even Python, however, still limits the use of functions. It does not allow partial application and has a very restricted lambda expression. Even in Python the positive Yang is dominant. Iteration, however, has its problems. Even simple while loops can be hard to understand (let alone verify) because the state changes not just with every step of the iteration but with each execution of each assignment statement in the body. The problems with iteration led to the invention of the pure functional languages ... Read full article.