Open matthiasnoback opened 3 years ago
shows some simple regexes and then shows and explains the alternative using parsers
Excellent idea. The obvious difference is that combinators for complex parsers are more readable and writable (after paying the learning cost).
One major but more subtle difference between combinators and regexes (and grammars and tokenisers) is that with the combinators, you parse and build your final data structures in one step. The docs could reflect that.
Agreed with all the other remarks as well, and mea culpa for the @deprecated, that's entirely on me. I was going to clean that all up before the 0.5 release :-S
Thanks for putting in the effort of giving feedback, much appreciated!
Much appreciated indeed! I will look into it a bit more when some time frees up. My daughter was born this week! 🍼👶
My daughter was born this week! baby_bottlebaby
Ah, great news, congratulations!
It remains an extremely cool tool that I'll keep using, regardless of when you'll have time to work on performance or other issues. I'll probably blog about it at some point as well.
In response to @mathiasverraes ' tweet here:
I think the documentation is very useful and developer-friendly already. I thought of a couple of things that might be improved:
atLeastOne
,zeroOrMore
,between
. In terms of documentation, I think it would be really helpful if there would be a page that shows some simple regexes and then shows and explains the alternative using parsers.@deprecated
; they are not in fact deprecated, it just seems they are not tested. As a user of the library it makes you feel somewhat bad about using these parsers, even though there's no alternative.Great work on the type annotations by the way, those are really helpful, and I think it's amazing that this is now possible in PHP today.
Thanks a lot for this awesome library! It was a nice thing to dive in and get to know.