make the HolonContext object a shared read, single write singleton #192
nphias
started this conversation in
Design Discussions
Replies: 1 comment
-
It's unclear what problem is being addressed here. The context object serves as a container for shared session and request state. A reference to it (not the context object itself) is being passed down the call stack. This makes it clear what methods depend upon the context and which don't. If we discover additional state that needs to be available, we can add it to the struct definition, without having to change any signatures. Why is any of this problematic? |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Instead of passing the HolonContext down the stack in function/method arguments and then passed back up again to the reference layer, where it is actually invoked (see test 6 related_holons / holon collections), have it created once during initialization and then available as a singleton to the reference layer whenever needed.
example code:
Beta Was this translation helpful? Give feedback.
All reactions