News for hackers. Stuff that matters.
Re:SICP Goodness – Why you don't need looping constructs by hajile on Friday June 29, 2018 @10:25AM (#17424689)
Closer to the CPU isn't a valid argument. Most major programming concepts don't exist in a CPU.

* CPUs are dynamically scoped

* CPUs are weakly typed

* CPUs are dynamically typed

* CPUs only compare to zero

* CPUs have no way to represent OOP

and so on

All that said, tail calls are very close to how the CPU works. They are just GOTO with additional parameters. If you implement tail calls with dynamic scoping, the parameters would be registers and the tail call would be a change to the instruction pointer. That would be very close indeed.

There are no comments on this comment yet.