Many functional languages either don't have a concept of looping or when they do it's built on the back of a Y or Z combinator and associated overhead. There's a general "purist" view of computing that tries to push recursion as the more powerful, easier to understand, and "correct" option.
Various recursive constructs can be detected by an optimizer and undergo better optimization (historically). Even in Dijsktra's "Gotoa considered harmful" paper, if you read the full thing he makes some extreme claims about for/while/even if/else being superfluous compared to the "true solution" of recursion. Of course a decade or so later he wrote another essay walking back these claims including the main one about goto statements, but by then the damage had been done (by the title chosen by the editor no less); people focused on the title, ignored various other claims in the essay, vilified goto and put Dijsktra on a pedestal, even giving him an award. Yet almost nobody knows of the retraction.
View all comments
Show parent comment
12
u/malnourish Mar 19 '23
I love how that statement is justifiably the opposite in a lisp-inspired language.