Hacker News new | ask | show | jobs
by tcheard 4196 days ago
Since when does a name have to provide sufficient context to distinguish the concept from other similar, yet distinct, ideas?

For example, tree data structures. There are:

2–3 tree, 2–3–4 tree, AA tree, (a,b)-tree, AVL tree, B-tree, B+ tree, B*-tree, Bx-tree, Binary search tree, Optimal binary search tree, Dancing tree, HTree, Interval tree, Order statistic tree, Red–black tree, Scapegoat tree, Splay tree, T-tree, Treap, UB-tree

In many of those the name doesn't provide much context at all to distinguish the concept from another one.

Names of things, at least in CS, are rarely ever named in a way to provide sufficient context of their meaning, without having some level of background context.

That is what the description of the concept is for, not the name. A name is too short to provide this. Usually the name is at the discretion of the original author (aka Dijkstra in this case). If you are trying to determine the complete concept of something, or you are trying to distinguish the concept from other similar ideas, only from the name, you are doing it wrong. Go read the documentation about the concept for that.

1 comments

I'm not saying a name has to provide sufficient context. I'm saying a name that provides that context is superior to one that does not.

A red-black tree is named so because those were the colors their laser printer supplied. This is (much like semaphore) a historical accident. Yet, just by the name red-black, you do indeed have enough context to distinguish it from a plain old binary search tree. The defining feature is that you color every node either red or black, thus red-black in the name.

Likewise with splay tree: the defining function is the splay operation, which the name is a vivid reminder of.

Splay tree and red-black tree are Good Names (TM). B tree, B+ tree, B* tree, Bx tree are Bad Names (TM).