-
-
Notifications
You must be signed in to change notification settings - Fork 403
While All/Any #7282
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
While All/Any #7282
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Some early thoughts. I like the idea 🙂
While this looks like a good start, I'm going to mark this as draft currently because there are some methodological things to think about (e.g. we have if any/all and while any/all, are there ways we can re-use parts of the multiline condition code? Are there other sections/conditions that might benefit from having something like an any/all? etc.) and it might be worth exploring this a bit more to see if there's anything fancy we can do :) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks pretty good overall.
One (cursed) change we might want to make is with do while.
Rather than:
do while:
a
b
do:
# code
We might have...
do:
# code
while:
a
b
I'd like to hear what others think.
@APickledWalrus Just wanted to touch base a little. Also, regarding @Moderocky 's comment. I would like to say I've fully met the conditions. As only some parts are reused between both SecWhile and SecConditional, and the rest are unique to their behavior. Whether or not the methods I added are good or not, well is up to the teams discretion. The methods I added should cover a general basis if any elements were capable of implementing an Anyways, that about sums it up. Let me know your thoughts. |
I think
is much more readable and intuitive than the current order, since it's read in order of execution |
Description
This PR aims to add AND conditions + OR conditions to SecWhile. Allowing users to define multiple conditions to check if the while loop should continue.
Target Minecraft Versions: any
Requirements: none
Related Issues: #5883