Monday, June 12, 2017

[Better] Chat node architecture

Here the "responder" R is an object with a member R.response( ). There is only one responder in the program so, if you are in its namespace, it can be accessed directly as a global variable and its response() method can be swapped for different things.
Things inside the namespace, can pass R as an argument to sub chats outside the namespace. Inside the namespace, you can set the "global" R.response() back to a parent value after sub-processing. Outside the namespace you also set it back to your parent, but using a passed in version of R rather than accessing a global.

No comments:

Post a Comment