[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Groff] broken interaction between line numbering and diversions
From: |
Tadziu Hoffmann |
Subject: |
Re: [Groff] broken interaction between line numbering and diversions |
Date: |
Wed, 17 Sep 2014 18:19:12 +0200 |
User-agent: |
Mutt/1.5.21 (2010-09-15) |
> The question I'm posing is whether a user who uses a
> diversion in this "wrong" (or, let's say, less than optimal)
> manner should see output that is so clearly not what was
> intended, or whether the software should do something
> intelligent with the user's suboptimal input, producing
> output that is probably what the user wanted.
My opinion is that software should not try to second-guess
what a user wants. It's very bad for predictability[*],
and causes unnecessary complexity in the programs.
It's much better to have consistent behavior (and in this
case, groff *is* behaving consistently; it is how diversions
are implemented), and instead educate the user as to how the
program is intended to be used. And regarding troff,
I think there's no excuse in not reading the documentation:
you'll seldom find a more concise yet comprehensive
description of a program's behavior as the Troff User's Guide.
[*] It's like single namespaces and global variables.
We might not like them because they make cooperation between
program code written by different people more complicated,
but in a way they *are* predictable.