Skip to content

Commit 3556160

Browse files
authored
Add "Huffmanize" to glossary
1 parent 43d8830 commit 3556160

File tree

1 file changed

+18
-0
lines changed

1 file changed

+18
-0
lines changed

doc/Language/glossary.pod6

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -269,6 +269,24 @@ X<|fiddly>
269269
270270
Too complicated to apply a meta-op to. See L<operator|#Operator>.
271271
272+
=head1 Huffmanize
273+
274+
With reference to L<Huffman coding|https://en.wikipedia.org/wiki/Huffman_coding>,
275+
"huffmanizing" is making things that are commonly used easier, and often shorter,
276+
to type. With things that are used less frequently it's both less of a bother
277+
to type longer pieces of code and often longer, more descriptive naming
278+
is necessary to easily be reminded of what the rarely-used feature does.
279+
280+
For example, printing output is a common task, while performing
281+
thread-safe atomic addition on native atomicity-safe integers is much less so.
282+
There's a need to "huffmanize" the task printing and that's why you can do it by
283+
just typing three letters L<put>. But there's no need to "huffmanize" the
284+
rarely-needed atomic operators, which is why you type the lengthier
285+
names, such as L<atomic-inc-fetch>. L<put> is a bit of a vague name, but because
286+
it's commonly used, it's easy to learn what it does. L<atomic-inc-fetch>,
287+
on the other hand is rarer, and the more descriptive name helps recall
288+
its purpose better.
289+
272290
=head1 iffy
273291
X<|iffy>
274292

0 commit comments

Comments
 (0)