Functorize over the regex backend
This would be nice. In particular, it may allow to implement the whole thing on top of native javascript regex (which are probably faster when used in javascript).
After https://github.com/Drup/tyre/pull/18, we are now in a much better position to do this, since we only use "vanilla" regular expression operators.
So, I've made two early prototype to investigate this a bit:
-
https://github.com/Drup/tyre/compare/functorized Uses a functor to abstract over the backend. The issue with that version is typed regex written with one backend will be incompatible with any other backend. The upside is that the API is unchanged once the functor is applied.
-
https://github.com/Drup/tyre/compare/poly Add a type parameter to the
Tyre.ttype depending on the backend. This means there might be a chance to write backend-agnostic regexs, although that would require more work and I'm not sure the final result will be so nice. The downside is that we would require new functions for the compilation aspects, and the API will require some changes. It also seems a bit cumbersome.
If anyone is interested and find one version or the other better, I'm open to suggestions.
False alert, marks are still needed, sorry everyone. :package: