Iterative methods done right (life's too short to write for-loops)
Like the other commenters have remarked, I have a feeling this post is meant for folks in numerical computation.<p>In numerical mathematics, iteration is typically expressed as recursive equations, and I suspect the iterable construct in Julia helps lower the impedance mismatch of translating numerical ideas to code. There&#x27;s a lot of tedious &quot;book-keeping&quot; (keeping track of indices, etc.) involved in numerical codes, and appropriate abstractions can help reduce errors, as well as improve composability and extensibility. At the very least, with iterables the code will match the math better than if for-loops were used.<p>For most other (general) programmers though, a conjugate-gradient example might be a little too complicated of an example for demonstrating iterables. Also, while iterables as an abstraction can be useful at times, the simplicity of for-loops can&#x27;t be beat for most general use cases. There is also a performance overhead with iterables.<p>Also, just to point out there is a bit of overlapping but differing terminology here: &quot;iterative methods&quot; [1] refer to a specific procedure in computational math; whereas &quot;iterables&quot; in computer programming refer to iterators [2] which perform (lazy or eager) traversal. The latter can be used to implement the former, but they are mostly different ideas.<p>[1] <a href="https:&#x2F;&#x2F;en.wikipedia.org&#x2F;wiki&#x2F;Iterative_method" rel="nofollow">https:&#x2F;&#x2F;en.wikipedia.org&#x2F;wiki&#x2F;Iterative_method</a><p>[2] <a href="https:&#x2F;&#x2F;en.wikipedia.org&#x2F;wiki&#x2F;Iterator" rel="nofollow">https:&#x2F;&#x2F;en.wikipedia.org&#x2F;wiki&#x2F;Iterator</a>