News for hackers. Stuff that matters.
Re:Scheme in Scheme on WASM in the Browser by odyssey7 on Friday December 15, 2023 @02:00PM (#38657352)
This could be surprising, but the scenario already exists in production. In JavaScript's strict mode, Safari applies tail call optimization, but systems relying on V8 don't.

To illustrate, the following code causes a stack overflow for me in both Google Chrome and in Node.js, but runs without issue in Safari.

  "use strict";
  const countdown = (n) => n == 0 ? console.log('done') : countdown(n-1);
  countdown(100000);

There are no comments on this comment yet.