News for hackers. Stuff that matters.
Re:Deriving the Y Combinator in JavaScript by lsiebert on Thursday July 05, 2018 @09:04PM (#17468172)
I mean, recursion is just a way of saving state on the program's call stack implicitly instead of explicitly in a stack data structure.

fundamentally recursion is syntactical sugar over loops and stacks, as assembly can show you.

C can do recursion. It can't do first class functions, though it can pass function pointers. It just can't create new functions dynamically based on non local variables, at least not without shenanigans.

Re:Deriving the Y Combinator in JavaScript by rs86 on Friday July 06, 2018 @05:25PM (#17475257)
Recursion is not defined in terms of the execution of the program (such as storing data on the call stack). For example you can have stack less languages with recursion.
Re:Deriving the Y Combinator in JavaScript by rustler on Friday July 06, 2018 @02:46AM (#17469460)
> fundamentally recursion is syntactical sugar over loops and stacks, as assembly can show you.

That's one possible implementation of recursion on commodity hardware. Recursion itself is a mathematical method for defining a function which may not even be computable, or may be computable using other primitives.

Re:Deriving the Y Combinator in JavaScript by pitched on Thursday July 05, 2018 @09:22PM (#17468251)
Functions are syntactic sugar on calls and calls are syntactic sugar on jumps so those dynamic shenanigans would be messing with calling conventions? That might not be too ridiculous.