-
Notifications
You must be signed in to change notification settings - Fork 56
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Should Parser
use associated types, rather than generics?
#163
Comments
This is a re-implementation of winnow-rs#5. It was abandoned before as we didn't have a motivating case. Now, we've seen it can improve type inference, so giving it another try. Fixes winnow-rs#163
This is a re-implementation of winnow-rs#5. It was abandoned before as we didn't have a motivating case. Now, we've seen it can improve type inference, so giving it another try. Fixes winnow-rs#163
With #220, it looks like associated types make it so we can't imp |
We could limit this to just |
When playing around with winnow-rs#163, I found that carrying more type information along in `Parser`s, type inference works better, offering an alternative to solving the core problem that associated types was looking to solve.
When playing around with winnow-rs#163, I found that carrying more type information along in `Parser`s, type inference works better, offering an alternative to solving the core problem that associated types was looking to solve.
When playing around with winnow-rs#163, I found that carrying more type information along in `Parser`s, type inference works better, offering an alternative to solving the core problem that associated types was looking to solve.
The driving benefit for this was resolved in #222 using more phantom data. afaik the main benefit for associated types at this point is removing the phantom data. |
With how that failed, I'm closing this |
I experimented with this in #5 but my motivating case went away. nom went forward with this in rust-bakery/nom#1626. In rust-bakery/nom#1631, type inference worked better than in #6 for parsers returning concrete types because of the associated types.
The text was updated successfully, but these errors were encountered: