This Engineering Notebook post is primarily for Félix. I'm making this post public because I like to avoid important conversations.
As I said yesterday, we want to avoid forks in Leo's code. For leojs, that means basing transliterated ts code on Leo's official code, not some leojs-specific reworking.
This morning I made a list of Leo's crown jewels, Leo's essential features. They all should eventually become part of leoInteg. The list is long, and the code is complex:
- Leo's find commands, in leo.core.leoFind.
- @clean and @find, in leo.core.leoAtFile.
- The @clean update algorithm, in leo.core.leoShadow.
- Leo's importers, in leo.core.leoImport, leo.plugins.importers, and leo.plugins.writers.
- Leo's Position and VNode classes, in leo.core.leoNodes.
- Leo's generators, in leo.core.leoCommands.
Imo, that's too much to transliterate! Instead, I recommend:
Use the bridge to create trees.
In other words, transliterate only the code that must be fast:
- Leo's interactive find commands, in leo.core.leoFind.
- Leo's Position and VNode classes, in leo.core.leoNodes.
- Leo's generators, in leo.core.leoCommands.
Summary
leojs should use ts only for those commands that should execute synchronously for performance reasons. There aren't many because vs-code will do editing.
Commands that create trees of nodes should use Leo's bridge.
Transliterating too much would fork Leo's code and waste our time.
Félix, your comments please, Amigo.
Edward