Thu Mar 29 16:12:22 EDT 2007
so, attempt to create a 'downward lambda' for poke. allocating on
stack for now, with later possibility to allocate on heap. how hard is
this to have in some form?
- all cells are the same size
- values are pointers to 'object'
this needs quite a bit of support:
the function bodies themselves take:
- arg list (part of environment?)
a function invokation is:
- create environment extension
- run function
- cleanup environment extension
object_t env; // parent + 2 variables
// invoke a function 'FUN'
// create new environment
ext = env; // link parent
ext = 123; // init first and only arg
FUN(ext) // invoke fun
this resembles PICO.
ok.. going a bit too far here. what about introducing these features
when they are really needed?
one question though.. if only downward closures are needed, why not
use dynamic binding instead?