[REBOL] Re: the utility of 'bind
From: greggirwin:mindspring at: 21-Jan-2004 14:27
Hi Andreas,
AB> What is the utility of 'bind? No, I don't necessarily mean the typical
AB> cases where bind is needed to prevent errors. What I'm really thinking
AB> about are situations, where REBOL's behaviour regarding contexts and
AB> bind is actually contributing towards an elegant solution for a real
AB> problem.
Maarten uses it in Rugby in the creation of stubs for remote
invocation, but he would have to contrast how it might be done without
BIND as I haven't thought about it in detail.
I use bind in my FSM dialect. There, you define action blocks that are
triggered when the FSM is sent events. A single FSM can act like a
shared "engine", with BIND used to execute the actions in the proper
context--usually the one that sent the event, but could be any context
you want.
-- Gregg