3 ms·
Being in particular function is itself a state, too. The program counter, stack pointer, and stack contents are all state.
by robotresearcher 3y ago
Being in particular function is itself a state, too. The program counter, stack pointer, and stack contents are all state.
- skydhash 3y agoThat’s the C abstract machine, not the Lisp one.
- robotresearcher 3y agoMost language implementations have these or similar things. Variations don’t change the point I’m making.
- deleted 3y ago[deleted]
- kazinator 3y agoThe C abstract machine has nothing about stacks or program counters. There is the concept of sequencing: what is currently being evaluated, what has been evaluated and what is not yet evaluated. When a function is called, the calling function is suspended; then when the invoked function returns, the caller is resumed. From that we can infer that there must exist an activation chain. Mainstream Lisps have all these abstract elements also. The main differences are in data, and environments what constitutes a value; what is a type; what is a variable; what is the lifetime of an object, and the scope of visibility of a binding, ...