From: Douglas McIlroy <douglas.mcilroy@dartmouth.edu>
To: TUHS main list <tuhs@tuhs.org>
Subject: [TUHS] The 'usage: ...' message. (Was: On Bloat...)
Date: Sun, 19 May 2024 10:03:12 -0400 [thread overview]
Message-ID: <CAKH6PiVSU4o5twt8EXZO6FAKdxMu19SOWLEyYRVa0yBM3BXAUA@mail.gmail.com> (raw)
[-- Attachment #1: Type: text/plain, Size: 1099 bytes --]
> was ‘usage: ...’ adopted from an earlier system?
"Usage" was one of those lovely ideas, one exposure to which flips its
status from unknown to eternal truth. I am sure my first exposure was on
Unix, but I don't remember when. Perhaps because it radically departs from
Ken's "?" in qed/ed, I have subconsciously attributed it to Dennis.
The genius of "usage" and "?" is that they don't attempt to tell one what's
wrong. Most diagnostics cite a rule or hidden limit that's been violated or
describe the mistake (e.g. "missing semicolon") , sometimes raising more
questions than they answer.
Another non-descriptive style of error message that I admired was that of
Berkeley Pascal's syntax diagnostics. When the LR parser could not proceed,
it reported where, and automatically provided a sample token that would
allow the parsing to progress. I found this uniform convention to be at
least as informative as distinct hand-crafted messages, which almost by
definition can't foresee every contingency. Alas, this elegant scheme seems
not to have inspired imitators.
Doug
[-- Attachment #2: Type: text/html, Size: 1310 bytes --]
next reply other threads:[~2024-05-19 14:03 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-05-19 14:03 Douglas McIlroy [this message]
2024-05-19 16:18 ` [TUHS] " Paul Winalski
2024-05-19 16:21 ` Paul Winalski
2024-05-19 17:22 ` [TUHS] Re: The 'usage: ...' message Ralph Corderoy
2024-05-19 20:42 ` [TUHS] Re: The 'usage: ...' message. (Was: On Bloat...) Dave Horsfall
-- strict thread matches above, loose matches on Subject: below --
2024-05-19 23:08 [TUHS] " Douglas McIlroy
2024-05-18 18:07 [TUHS] Re: On Bloat and the Idea of Small Specialized Tools Douglas McIlroy
2024-05-18 18:22 ` Ralph Corderoy
2024-05-19 8:58 ` [TUHS] The 'usage: ...' message. (Was: On Bloat...) Ralph Corderoy
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=CAKH6PiVSU4o5twt8EXZO6FAKdxMu19SOWLEyYRVa0yBM3BXAUA@mail.gmail.com \
--to=douglas.mcilroy@dartmouth.edu \
--cc=tuhs@tuhs.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).