News for hackers. Stuff that matters.
Re:ChrysaLisp by kazinator on Thursday January 16, 2020 @12:06PM (#22066457)
The JVM defines a particular model for program organization, which is largely inescapable from the point of view of someone targeting a language front-end to it.

x86_64 instruction set gives the programmer complete control over the organization of memory: the stack, use of registers, calling conventions and so on.

It has few safety features.

x86_64 doesn't specifically support tail calls, but it makes tail calls possible by way of jump instructions being able to go anywhere in the address space. An instruction in the middle of one function can branch to an instruction in the middle of another function, and without doing anything with the registers or stack.

The JVM byte code doesn't allow such a thing.

The JVM supports iteration. Therefore local tail calling is possible, because it's a syntactic sugar for local control transfers. That's presumably why Clojure can have recur.

Re:ChrysaLisp by lvh on Sunday January 26, 2020 @07:23PM (#22155886)
That sounds like a long-winded way of saying "x86_64 and the JVM are different but neither prevents TCO", which is precisely my point! Unless your point is "it's not TCO unless it's literally an instruction called 'jump' and iteration transforms don't count"?