5 ms·
> This feature, called tail call optimization (or TCO), has been around for a few decades and it is a sad commentary on the state of our programming languages t
by jgwil2 6y ago
> This feature, called tail call optimization (or TCO), has been around for a few decades and it is a sad commentary on the state of our programming languages that none of the modern languages support it.
TCO is part of ECMAScript specification, although apparently only Safari supports it.[0]
[0] https://2ality.com/2015/06/tail-call-optimization.html https://2ality.com/2015/06/tail-call-optimization.html
- bjoli 6y agoWhich, considering JavaScript is a language many compile to, sucks. I have said it many times: recursion is unbiased. Compiling a languages looping facility to something recursive is simple. Forcing one looping facility into the shape of another looping facility is the path to suffering.