News for hackers. Stuff that matters.
Re:Introducing "Functional JavaScript" by Cushman on Wednesday March 20, 2013 @10:52AM (#5407599)
Functional programming doesn't have to mean deep recursion-- it's not like you can't use functions and loops in the same code.
Re:Introducing "Functional JavaScript" by gngeal on Wednesday March 20, 2013 @01:24PM (#5408729)
Tail calls are not as much about "deep recursion" as they are about continuation-passing style, compositionality, and similar things.

It's like with lazy evaluation. It allows you to write novel kinds of algorithms and data structures, and you can emulate it with helper objects or structures, but it's tedious, muddles the essence of the code, and the implementation without them (the helper structures) would be simpler if the language provided you with lazy expressions.

In other words, repeat with me: loops don't compose. They're not first-class, they're not extensible, they're a syntactic construct.

Re:Introducing "Functional JavaScript" by munificent on Wednesday March 20, 2013 @05:14PM (#5410380)
> In other words, repeat with me: loops don't compose.

Iterators do, though. Most of the languages that don't do TCO instead lean on those instead: C++, C#, Python, and eventually JavaScript.