Page MenuHomePhabricator

Come up with a distinctive term for "object name" and provide it on all named objects
Closed, ResolvedPublic

Description

We have a fair amount of code which manually builds strings like D123 like this:

$object_name = "D".$revision->getID();

It would be nice to centralize this into the objets, so we just call:

$revision->getObjectName();

However, "object name" is pretty much the vaguest possible name for this. I've primarily avoided building this because getObjectName() is such an ambiguous, garbage method name.

It would be nice to come up with some better name to identify the D123, T123, rX sort of strings we use as local/human object identifiers.

Event Timeline

epriestley raised the priority of this task from to Wishlist.
epriestley updated the task description. (Show Details)
epriestley added a project: Phabricator.
epriestley added subscribers: epriestley, chad, btrahan.

"Designation", "Monogram" and "Trade Name" seem like the least-bad thesaurus candidates.

I think "monogram" isn't bad -- it's a reasonably good fit, and we're very unlikely to use it for anything else.

+1 for Monogram, although Wikipedia adds Cypher to the suggestions - I think Monogram is slightly more obvious though.

Did anyone have objections to "monogram"? After mulling this over for a couple of days I still feel like it's the leading contender.

(I dig monogram. I even approved some new code using it!)

epriestley claimed this task.

Cool. I'm just going to close this since there's a huge hard-to-grep-for long tail and I don't think this is important enough to make a big push over, but we can start doing this in new/updated code as stuff arises. I think it'll be a small consistency win in the long run.