Remix.run Logo
PeterWhittaker 7 days ago

Do you plan on supporting TCO? I was disappointed to learn a few years ago that V8 wouldn't, on the grounds that, IIRC, it would confuse developers.

True tail call recursion and lazy evaluation would enable truly functional JS.

aapoalas 7 days ago | parent [-]

It is the plans, since it is in the ECMAScript specification... It might actually be fairly easy now that I think about it?

eliassjogreen 7 days ago | parent [-]

If I am not mistaken there are a few `TODO`s sprinkled all over code relating to function calls about implementing TCO. Shouldn't be too hard from what I can remember when I last looked over those parts of the code.