3 ms·
The scheme R5RS [1] (essentially, an edition of the language standard) defines in section 3.5 what it means for an implementation to be “Properly tail recursive
by joppy 6y ago
The scheme R5RS [1] (essentially, an edition of the language standard) defines in section 3.5 what it means for an implementation to be “Properly tail recursive”: it must support an unbounded number of active (yet-to-return) tail calls. I think “proper tail call” is a good terminology for a tail call that replaces the callers stack frame (or some equivalent, depending on implementation).
It doesn’t necessarily change the semantics, but it does change what kind of programs are sure to crash your machine, and what kind are going to run fast, which is also an important property of programming languages.
[1]: https://schemers.org/Documents/Standards/R5RS/ https://schemers.org/Documents/Standards/R5RS/
- OskarS 6y ago> It doesn’t necessarily change the semantics, but it does change what kind of programs are sure to crash your machine, and what kind are going to run fast, which is also an important property of programming languages. Yeah, this is exactly what I meant. The semantics of the language are the same regardless (i.e. the meanings of programs doesn’t change), but in practice it makes a huge difference.