Open stefnotch opened 8 months ago
Is there a plan to complete this feature request? I would love to have the same API as well. I can also help if anything is missing/behaves in an undesired way.
@Dan-wanna-M From what I can gather, the owner of this repository is rarely available. Which I fully understand, life happens.
So I think for the time being, the most reasonable thing we could do would be: Properly implementing this API and submitting a PR.
@stefnotch Sure, let's fork it. We can discuss the specific tests/benchmarks/etc in the forked repository or in this issue.
@Dan-wanna-M Sounds good. I invited you to the fork that I previously created as a collaborator. You should be able to do (almost) everything there.
I'd love it if the SubTrie API were more efficient, and if it were a slightly lower level abstraction of what actually happens.
If I construct a Trie like
Then I'd expect the following to be true
But the current subtrie API instead wants the entire prefix, over and over again.
I'd also enjoy it if there were a function akin to
My use case is parsing a stream, character by character. There, it's nice if I do not have to keep track of already parsed characters to satisfy the Trie API. Part of why I really want this is the fact that libraries like chumsky and combine very much prefer it when one does the parsing step with individual characters, and doesn't look back at what has already been parsed.