Repository navigation
Adding more explicit rules #8
Dhaneshen1810
started this conversation in
Ideas
Replies: 1 comment 2 replies
|
Hi, The syntax on this feature is something I definitely debated, and I appreciate you bringing it up, but I don't believe changing it makes it anymore obvious. The feature is just something you have to learn through the docs, and the syntax tell is that it is unique to conditionless rules. Changing it misaligns the overall rules syntax, and unfortunately it cannot really be improved on without rule attributes (which I don't want to add unless I have at least three attributes to implement). |
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
One small usability idea I had while learning Banish is adding a more explicit run_once construct for conditionless rules.
Right now, something like:
announce? {
ticks = 0;
println!("Red light");
}
means the rule runs once when the state is entered. As a new user, I didn’t immediately understand that behavior from the syntax.
I wondered if something more explicit, like:
run_once {
ticks = 0;
println!("Red light");
}
or possibly:
run_once! {
ticks = 0;
println!("Red light");
}
could make that behavior easier to understand at a glance.
All reactions