-
-
Notifications
You must be signed in to change notification settings - Fork 155
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
ignored
vs ignore
#510
Comments
Yep, this is pretty much the rule I've been trying to keep to in my head (subconsciously, perhaps). I think it's a useful thing to delineate that which the parser cannot control (the syntax of the grammar it must pass) vs what it can control (the output that it produces). Being explicit about this somewhere in the docs might be useful, I think. You're right that several combinators currently break this rule:
Special mention regarding I am happy to change these, although I think a few cases could become confusing ( Does anybody else that feels they have a stake in the library's development have thoughts/preferences about this? |
Great, thanks a lot for the clear post @zesterer . (I also realize a couple of my examples weren't correct, so this was informative for me) |
I personally really dislike |
Same, I think I would lean towards being concise and matching existing Rust names when possible over mood-correctness. So:
Even as a native English speaker the mood distinction was lost on me, and left me guessing which tense to use each time. |
can I work on this, once a final decision has been made? |
Sure. I don't think there are really actionable conclusions though, and any work would more than likely just be a careful find + replace operation. |
(V small, as I mentioned #498, writing it because it sounds like this is last chance for crate-wide changes. Feel free to close without comment)
Why is
.ignored
not.ignore
? We have.ignore_then
&.then_ignore
, but then.ignored
?Currently we seem to use the indicative mood to describe the structure of the language we're parsing —
delimited_by
/separated_by
/repeated
. And then the imperative mood to tell the parser what to do —.map
/select
. Consistent with that — we'd have.ignore
(and maybe.label
...).Given that the rustc errors are difficult to read, to the extent we can use mood or tense to make functions clearer, that would be excellent.
(though I realize that #498 suggested going the other way —
.collect
would be the imperative mood, while.collected
would be the indicative mood...)The text was updated successfully, but these errors were encountered: