Replies: 1 comment
-
Hi @kjkostlan |
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
-
It's nice to see an editor that is based mostly around pure functions. However, it may be possible to reduce how many places atoms are used. For example, functions such as editor/resolve-command could probable refactor to use the body of the atom rather than the atom itself.
My editor (https://github.com/kjkostlan/reclur) has core/dispatch-listener which dispatches mouse and keyboard events and to the app-state without altering any atom. However, it is called by various functions that mutate the app-state atom (core/undo-wrapped-listener, cpanel/dispatch). This reduces the number of uses of the atom.
It may be useful for cases such as with multiple windows open, etc to have more of the app mutation-free. Note that my editor uses only a single Jpanel and no other java components (no buttons, no menus) because Java mutates everything everywhere. To leverage the full advantage of minimizing mutation presumably a similar approach or a serialization between clojure and java objects may be needed.
Beta Was this translation helpful? Give feedback.
All reactions