by alain94040 · 3y ago · 0 comments
I guess I'm describing some kind of custom in-memory database engine.
Anyway, I'm confused as to how the purity of Lisp functions would or would not prevent me from writing this code? Is this a use case that is bad for Lisp, or am missing something?
For your use-case a mutable reference behind some type of synchronized accessor would probably suffice. If you want to get fancy you could design the system in such a way that any point in time could be replayed or rewound to, since you have the commands and the initial state.
Some ideas to look into:
[1] https://github.com/acid-state/acid-state
[2] https://docs.datomic.com/pro/getting-started/brief-overview....