You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It would be nice to have operator| and operator+ as a shorthand for alt and seq.
Has it not be done already by design?
The many combinator could also be aliased by unary operator*, as in Boost.Spirit, but that's a bit more controversial since the standard syntax would be a postfix operator rather than prefix.
In any case, very well done library!
The text was updated successfully, but these errors were encountered:
Honestly speaking, I never thought this repo would draw interest from anyone other than myself, so I didn't put a lot of thoughts on ergonomics of the APIs. For my personal uses, I could live with seq, alt and many just fine, but I agree that operator| and operator+ could make the client codes much terser.
Off the top of my head, adding those overloads should be a fairly simple task. I'll try to do it when I got some time to spare. Again, I appreciate your suggestion.
Personally I don't quite like the pervasive uses of operator overloading in Boost.Spirit. Changing the meaning of unary * is also something that I try to avoid, as for my taste the readability improvement of it doesn't seem to justify the confusion it may potentially cause.
Hi,
It would be nice to have
operator|
andoperator+
as a shorthand foralt
andseq
.Has it not be done already by design?
The
many
combinator could also be aliased by unaryoperator*
, as in Boost.Spirit, but that's a bit more controversial since the standard syntax would be a postfix operator rather than prefix.In any case, very well done library!
The text was updated successfully, but these errors were encountered: