Add reusable zipper buffers - #65
Conversation
|
Nice! I quite like the API and naming. |
|
I'm ok with the API concept. I'd prefer different names for The word On the word
As far as |
|
I think the most important part not covered there is that you want to take these zippers at a path, you may not have access to the root, nor want to pay the cost of re-descending. |
There are two possible interpretations of what you might want: 1. The ZipperBuffer represents the But if I assume you want 2. it does mean there is now a failure mode where the beginning of the buffer deviates from the So the ZH version of
Some amount of re-descending is unavoidable. There is no way a node stack can be transplanted from one base to another without redoing the work to descend from the new base. |
This introduces
ZipperBuffer. This allows re-using zipper path and stackVecs.Name up for change, don't have a strong preference.
detach+attach,relocatepreserve the path. might need to change the API so this is explicit.A few additional non-public API changes to make it work.
descend_to_byteused instead ofdescend_toto avoid aliased&mut.