-
-
Notifications
You must be signed in to change notification settings - Fork 367
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
Condition → Conditional; IfCondition → Condition #3862
base: master
Are you sure you want to change the base?
Conversation
Thanks for your pull request and interest in making D better, @Bolpat! We are looking forward to reviewing it, and you should be hearing from a maintainer soon.
Please see CONTRIBUTING.md for more information. If you have addressed all reviews or aren't sure how to proceed, don't hesitate to ping us with a simple comment. Bugzilla referencesYour PR doesn't reference any Bugzilla issue. If your PR contains non-trivial changes, please reference a Bugzilla issue or create a manual changelog. |
If there's still need to clarify |
I don’t know how you’d mix those up. A condition is something that you evaluate to a boolean to test it.
I’d really like to keep Using
If you want - IfCondition:
+ Condition:
Expression
+ AssignCondition
+
+ AssignCondition:
auto Identifier = Expression
scope Identifier = Expression
TypeCtors Identifier = Expression
TypeCtorsopt BasicType Declarator = Expression Using
But |
That sounds like a Java name 🙂
But that's a bit besides the point. I think it's not worth bikeshedding over the best names for grammar production rules. They are mostly local. It's best to just pick something and be consistent with it. This PR changes them for marginally better clarity at best, so unless the names are made consistent with dmd (which is a nice property as they often need to be compared), I'd err on the side of keeping them as is. |
Using
IfCondition
in the grammar is misleading. It can be used forif
, but also forwhile
andswitch
. On the other hand,Condition
, which refers to conditional compilation constructs, isn’t the stuff in parentheses of astatic if
,debug
orversion
, but the wholestatic if (…)
/debug (…)
/version (…)
; therefore, I replaced it withConditional
.