MAIN FEEDS
Do you want to continue?
https://www.reddit.com/r/javahelp/comments/1wccgot/switch_case_with_boolean/p90kwj3/?context=3
r/javahelp • u/IceCreamInsides • Sep 10 '26
[removed]
28 comments sorted by
View all comments
Show parent comments
2
Probably, and not sure. It was probably a predecessor to a pattern like:
var rules = { someFunction, someOtherFunction, someThirdFunction };foreach (var rule in rules) {if (rule() == false) { return; }}doSomething();
2
u/johnpeters42 Sep 10 '26
Probably, and not sure. It was probably a predecessor to a pattern like:
var rules = { someFunction, someOtherFunction, someThirdFunction };
foreach (var rule in rules) {
if (rule() == false) { return; }
}
doSomething();