Yesterday I made an instructive mistake. In PR #3473, I attempted to fix a hang in Leo's paste-node command using alt generators. Instead, I should have looked for the actual cause of the hang.
c.recompute_all_parents must use a VNode-based generator because the v.parents arrays are invalid. As a result, Position-based generators won't work. But this situation is uncommon!
Rather than relying on alt generators, it's preferable to restore the integrity of Leo's data as soon as possible!
For example, the new paste-node code hangs because the command tries to compute the position of the to-be-pasted node after c.unarchive_to_vnode invalidates Leo's data. Doh! paste-node should do this before calling c.unarchive_to_vnode.
After several hours of aimless flailing I trashed all my work with `git checkout .`
Summary
VNode base (alt) generators are worth having, but they are not cure-alls. Alt generators are essential only in a few limited situations. Otherwise they are, at best, minor optimizations. They are no cure for logic bugs.
Edward