3 ms·
Context + reactive memo functions is a powerful way to manage global state. Context namespaces adds more resolution to grouping Context state. These patterns ha
by briantakita 3y ago
Context + reactive memo functions is a powerful way to manage global state. Context namespaces adds more resolution to grouping Context state. These patterns have served me well over the past decade in javascript/typescript development.
I created ctx-core/be[1] & ctx-core/rmemo[2] to provide Contexts, be_ functions, & reactive memos. It has been a powerful set of abstractions for application code, build logic, devops, animation orchestration, etc.
I would love to use a systems programming language that supports Contexts & compiles fast. Jai looks interesting but it's still in closed beta. With Zig, there was a proposal to dependency inject a context which contains the allocator[3]. It didn't go anywhere though. Golang has Context[4]. It compiles fast but I would like a fast language without a Garbage Collector to compliment js/ts for expensive computations. Perhaps Rust could work but the compile time is slower than ideal.
At this point, Golang seems to be the best compliment as it addresses expensive computations. Hopefully a productive system programming language without the GC will be available to have good support for contexts.
[1]: https://github.com/ctx-core/be https://github.com/ctx-core/be
[2]: https://github.com/ctx-core/rmemo https://github.com/ctx-core/rmemo
[3]: https://github.com/ziglang/zig/issues/1286 https://github.com/ziglang/zig/issues/1286
[4]: https://pkg.go.dev/context https://pkg.go.dev/context