[Contentless] ITT you post right now [ASAP] your current thought [Brains][Thinking][Personal][#28] (999)

135 Name: (*゚ー゚) : 1993-09-9060 20:39

>>133
It's a stack-based language, and it's entirely dynamic, so e.g. defining a function expects the name and body of the function to be on the stack.
So that makes a lot of normal code constructs need you to write "backwards" (e.g. [6] "test" string->symbol define instead of the more normal-looking define test [6] to define test as a function that just pushes a 6 to the stack).

So I added quote, which just reads in the very next thing and puts it on the stack without trying to interpret it as a function reference, and uplevel, which basically interprets the thing on top of the stack in its caller's context. This means that you can e.g. define a function that outlives the context in which it was defined.

Thus, in order to get sensible-looking syntax like if, while, define, whatever, you define it yourself, and quote and uplevel are a minimal way of doing so.

This thread has been closed. You cannot post in this thread any longer.