洪 民憙 (Hong Minhee) 
@hongminhee@hollo.social · Reply to marius's post
@mariusor That's a good point for the Git example! However, from Optique's perspective as a general-purpose CLI parser, I don't think we can always assume that.
Some cases where a default value isn't straightforward:
- The dependency option might be required with no default (e.g.,
--database <name>for table completions) - The default might need async computation (e.g., auto-detecting a Git root by traversing up directories)
- Computing the default might be expensive, so we'd want to defer it until we know the option wasn't provided
That's why the current design has an explicit defaultValue function as the second argument to derive()—it gives users control over what happens when the dependency option is absent.