Synchronous Core, Async Shell #13756
Unanswered
CalebLarsen
asked this question in
Ideas
Replies: 1 comment 1 reply
-
That's what the intent of helix-core was. The primitives are synchronous and easy to unit test. |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
tl;dr Should we separate the editor into an outer async shell with a synchronous core?
While working on some tests for Editor I kept thinking that it would be much easier to test internal operations (editing, selections, movement) if there was a separation from external operations (highlighting, version control, LSP, file system, rendering). This inner editor could be synchronous (if I'm not mistaken) but would be imperative with operations modifying its documents. Then, an outer editor (Application?) would manage these external operations and call the appropriate functions on the editor.
The benefits would be a separation of concerns (in-process vs external), make testing in-process editing far simpler and faster, and allow the Editor structure to be broken up and be smaller.
Drawbacks include another nested layer of structs (arguably increasing complexity), the possibility in adding bugs in the restructuring, and the adage "if it ain't broke, don't fix it."
This would be a sizable architectural shift and require significant design and implementation work. I believe that the resulting code would be better laid out and the resulting ease of testing would allow for a stronger core to the system.
Design questions:
Beta Was this translation helpful? Give feedback.
All reactions