Earlier quoted context omitted.
Which is far more realistic than defining single-use enums all over the place. I don't know why more languages don't have named parameters...
Why is defining an enum "unrealistic"? It's at most 4 lines of very simple code to define an enum that replaces a boolean.
// Booleans + Named Parameters
foo(should_scrub=not options.scrubbing_disabled)
// Single-Use Enum
import ScrubbingOption, ShouldScrub;
foo(
if options.scrubbing == ScrubbingOption::Disabled {
ShouldScrub::No
} else {
ShouldScrub::Yes
}
)