[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[bug #66096] document behavior of multiple .hw calls
From: |
Dave |
Subject: |
[bug #66096] document behavior of multiple .hw calls |
Date: |
Fri, 16 Aug 2024 08:58:09 -0400 (EDT) |
Follow-up Comment #2, bug #66096 (group groff):
[comment #1 comment #1:]
> Like a lot of things with names inside GNU _troff_,
> hyphenation exception words are stored in a dictionary.
> Specifically, they resemble registers and
> strings/macros/diversions in this respect.
How things are stored internally should be of no concern to the user unless it
affects their understanding of how the program works.
Saying ".nr myvar 42" is understandable enough without knowing about the
underlying dictionary. Moreover, because the user chooses the name of the
register, it's clear that a subsequent ".nr myvar 86" clobbers the previous 42
stored there.
".hw word-one word-two word-three" is a bunch of words being thrown into a
nameless bucket. As far as the user is concerned, when groff needs to
hyphenate a word, it can look at every word in this bucket one by one and see
if any match the current word. As a mental model for the user's experience,
"look up in a dictionary" doesn't shed any more light than "sift through a
bucket."
The question on the user's mind is whether a subsequent ".hw word-four
word-five word-six" _adds_ those new words to the bucket, or _discards_ the
old bucket and starts a new one.
Thinking of the data structure as a dictionary rather than a bucket still
doesn't answer this question. Does every .hw call throw out the old
dictionary, or append to it?
> Also I will quibble with your summary; "multiple .hw calls"
> are entirely isomorphic to invoking the `hw` request with
> multiple arguments.
Yes, and that's exactly the thing that isn't communicated in the current docs.
The effect of multiple arguments is clear, but the effect of multiple
requests, regarding said isomorphism, is not. (It was communicated by
implication, arguably, by the old "can be used more than once" wording; I'm
pretty sure this was what Werner was trying to say when he added that wording
in Feb 2000 ([http://git.savannah.gnu.org/cgit/groff.git/commit/?id=032b39d83
commit 032b39d83]). But you're right that this was unclear from that
wording.)
I'd even say that .hw accepting multiple arguments is the very thing that
makes this a question. If each .hw call took only one word, it would be
obvious multiple .hw calls would have to add to the bucket/dictionary, because
being able to store one hyphenation exception at a time is absurd.
> So...how to get the most salient points into the learner's brain?
I don't think anything about the internal representation is salient to a user.
"Multiple calls to .hw add words to the list of hyphenation exceptions"
(however you want to word that) is really the only point I think is missing.
_______________________________________________________
Reply to this item at:
<https://savannah.gnu.org/bugs/?66096>
_______________________________________________
Message sent via Savannah
https://savannah.gnu.org/
signature.asc
Description: PGP signature