-
Notifications
You must be signed in to change notification settings - Fork 19
Description
Using conservative impl Trait we can change Chomp from being a monad-like parser-combinator into a full-fledged monad. Current development can be found in the https://github.com/m4rw3r/chomp/tree/experiment/impl_trait branch.
The monad has several benefits; macro is simpler, parsers are easier to compose due to not being forced to pass around the input state, simpler type-signatures for more complex parsers (associated types) and so on. The downside is that it currently only works on nightly rust and is incompatible with the current (0.2.6) version of Chomp.
The question here is what to do with the monad-like version of Chomp? I am committed to finishing up version 0.3.0 of Chomp using the monad-like parser using an Input trait which is compatible with the Input trait of the monad version (if you change a few method names). The contents of the buffer module are also largely unchanged between the two.
I see two choices here:
- Let
0.x.yversions of Chomp be monad-like, and release a monad-like1.0.0when it is equal to the functionality of Attoparsec, leaving2.0.0and up for the monad version which will require nightly untilimpl Traithas been stabilized. - Release the monad version under a new crate-name (eg.
chomp2)
Essentially this boils down to the question: How important is support for stable rust for users of Chomp?