Thu Nov 30 11:16:31 EST 2006

task local variables

necessary for things like current input/output. really important when
multiple consoles are attached. i need to think about this.. it's easy
if a certain variable is 'globally thread-local', but not if there's a
possibility to shadow definitions. as a matter of fact, this could be
used to implement objects too, since it's just local namespaces.

what about this:

:dyn <name> ...... ;		# create dynamic word

dyn <name>			# interpret dynamic word
` <name> interpret-dynamic

the definitions are simply dictionary links that are searched on the
return stack. the trade-off seems to be
- dynamic lookup + fast task switching
- static lookup (compiled) + slow task switching (safe/restore dynamic context)

seems the first one is best, since i mostly need it for the
interpreter 'current' io. this is a good opportunity to unify
dictionary lookup and generic assoc list lookup.

so, what's needed here is to look into some binding strategies:
* dynamic
* static at task compile time
* other? -> virtual member tables?