Re: Need background on design of groff character classes

Dave Kemper <[email protected]>
Newsgroups gmane.comp.printing.groff.general
Message-ID <CACRhBXNN0ZJUTCFSdWBigza5RQqwyPAa75=vCxbdXsmUEnb6Bw@mail.gmail.com>
On Tue, Nov 18, 2025 at 12:45 AM G. Branden Robinson
<[email protected]> wrote:
> Is it really asking too much of the user to write:
>
> .class \[EOS] .?!\[em]
> .cflags 1 \C'[EOS]'
> .cflags 5 \[em]
>
> instead of:
>
> .class \[EOS] .?!\[em]
> .cflags 1 \C'[EOS]'
>
> ?

Yes, it is.  To set a new cflag on arbitrary character x, you're
saying the user must examine every macro package that document loads
to see if one of them already sets any flags on character x, so that
he can do his own arithmetic to add those values to the new one he
wants.

Two years later, when he needs to include a new macro package, he has
to, first, remember that he used a .cflags request in this document
two years ago, and second, audit the new macro package for any .cflags
usage affecting character x.

Whenever you find yourself telling a user he has to manually perform a
set of algorithmic steps that a computer can do in a matter of
nanoseconds, you should probably instead be telling yourself there's a
design flaw.  Computers, not humans, should be doing algorithmic
tasks.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.