洪 民憙 (Hong Minhee) 
@hongminhee@hollo.social · Reply to marius's post
@mariusor I think there might be a misunderstanding here. The defaultValue function isn't the parser introspecting application logic—it's the opposite direction. The application injects the fallback behavior into the parser.
The parser doesn't need to know what that function does internally. It just calls it when the dependency option is absent. This is similar to dependency injection: the parser defines when to call the function, but the application defines what it does.
Without this, the alternative would be post-parse validation in application code, which loses the benefit of parse-time validation and, more importantly, shell completion—which was the original motivation for this feature.