effect
effect copied to clipboard
From Discord: Proposal to Change `Options.withDefaults` Semantics in CLI Package
Summary
In the conversation, @schickling discusses with @maxwellbrown and @timsmart about changing the semantics of Options.withDefaults in the CLI package, finding the current behavior counterintuitive, especially concerning boolean options. @timsmart explains that boolean options always have a value, suggesting their behavior is a special case. @maxwellbrown suggests they could throw an error when a default value is set for a boolean property to avoid unexpected behavior.
Key Takeaways:
- The current behavior of
Options.withDefaultsfor boolean options is seen as unexpected by some users. - Boolean options are internally set to false unless specified otherwise on the command line.
- There is a suggestion to throw an error for defaults in boolean options to improve intuitiveness.
- @maxwellbrown suggests the possibility of reevaluating internal behavior to allow overriding defaults.
- @maxwellbrown requests that an issue be opened for further evaluation since the CLI package isn't a current development priority.
Discord thread
https://discord.com/channels/795981131316985866/1367750473788162079