[<<][staapl][>>][..]
Sun Mar 16 16:38:27 EDT 2008

run

since 'run' is the ONLY PRIMITIVE word that accepts code, any code can
be made to run by overriding the behaviour of it. is this leading
anywhere?

if there are 2 languages (base and state), there should also be two
language types when code in these languages is represented as data AND
two STATE types.

once these things are in place, it should be clear what the behaviour
of run should be: dispatch on code and state type and do the right
thing:

\___ code      STACK      STATE
data\___

STACK          apply      error

STATE        apply/lift   apply


in order to not have to change everything, the base stack type can be
just a list. anything built on top though, needs to be typed.

let's start with the state type. OK. seems to work. this looks like a
generic 1-arg language (in scat-state.ss). looks like it's factored in
the right way now: didn't take any changes to core to change the rep
completely.

next: word structures. maybe take out source rep first: if it's
syntax, i can probably find source rep from source text instead of
storing it..

DONE.

the fact that SCAT words are procedures, is it a feature? or is a more
abstract interface required? now base and state have different reps,
maybe 'apply' (run) should be made abstract?

or.. each function object should carry a run method, which accepts
different states/stacks/arguments ?

i'm being pushed towards a staticly typed language..




[Reply][About]
[<<][staapl][>>][..]