3 ms·
Exceptions to rules cause mental overhead and maintenance headaches. Why should `echo` be the single solitary tool that responds differently to invocation with
by scubbo 2y ago
Exceptions to rules cause mental overhead and maintenance headaches. Why should `echo` be the single solitary tool that responds differently to invocation with `--help`?
- enriquto 2y agoLet me play the uno reverse card: why should "--help" be the single solitary string that echo does not print like the others?
- scubbo 2y agoFor two reasons, both related to the Principle of Least Astonishment: * Because the likelihood that someone entering `echo --help` _actually_ wants to print `--help` is staggeringly low * Because it's not the "single solitary string" that has special handling - `echo -n` does not print `-n`. `echo` already supports flags, and so it would be most-consistent and least-surprising for it to also support a standard default one