Conversation

Jarkko Sakkinen

Edited 2 days ago
A literally WYSIWYG pattern for command-line usage and help where each subcommand has a directory with 'mod.rs', 'usage.txt' and 'help.txt':

- Text files are more readable than code generation (unless you are a compiler).
- Text files has factors better outreach than code generation.
- Text files are non-executable read-only data.
- A bug in a static text file is a typo. Typo is a distraction for sure, but it does not radiate software bugs.
- The factor it simplifies command argument processing is much heavier than some minor redundancy that using text files introduces.
- Text files can be read without building a project.

#rust #clap #lexopt
1
3
2

@jarkko a bug in a text file is a typo for you, but for the person using the API, it becomes a bug.

1
0
0
@tdelmas yep, that's why static text files for help and usage work out better for me as it is precise and does not require compilation to view and review.

generation posseses the same risk and additional risk of a software bug.
0
0
0