The Yin and Yang of Programming: Reconciling Recursion and Iteration

2025-02-27
The Yin and Yang of Programming: Reconciling Recursion and Iteration

This paper explores the balance between recursion (Yin) and iteration (Yang) in functional programming. The authors argue that while purely functional languages are elegant, they lack the convenience of iteration; conversely, iterative languages, while practical, can lead to complex and hard-to-understand code. To address this, they propose a compromise: introducing controlled, declarative iteration into the purely functional language PyFL. This approach retains the advantages of functional programming while adding iterative flexibility, demonstrating its strengths in AI and other domains, effectively balancing Yin and Yang.

Development iteration