3

Is there a phrase in common use for a counter that is incremented every time the state of an object changes?

It's not quite a timestamp and it's not quite a revision but maybe there is a common name for this.

The usage is to provide loosely coupled portions of code with a simple way to quickly check if a large object has changed when callbacks are undesirable. The possibility that the object changed state and then changed state back to its previous state is not harmful and it's also unlikely.

7
  • 3
    That is called a "Version." May 4, 2016 at 14:22
  • 1
    a logical clock? May 4, 2016 at 14:36
  • @RobertHarvey I guess it is like a version but the connotation is off. Versions suggests that info about previous versions is available and each version builds upon the last. What I had in mind is simply a signal of any change at all. (Seems like I'm looking for a name that doesn't exist though.) May 4, 2016 at 14:37
  • Because programmers use words in their daily work that are very precise (i.e. language keywords and syntax), they tend to assume that words in ordinary languages are as precise. They aren't. May 4, 2016 at 14:39
  • @risingDarkness Nice. The Wikipedia article for logical clock looks just like what I had in mind. May 4, 2016 at 14:41

2 Answers 2

3

It is called a logical clock.

0

I guess it is like a version but the connotation is off. Versions suggests that info about previous versions is available and each version builds upon the last. What I had in mind is simply a signal of any change at all.

HTTP has something like this: a value that changes when the state of an object changes but it's not a counter. It's called "ETag" or "Entity Tag", see the Wikipedia article.

If I had something similar in my system, I'd certainly prefer alluding to or borrowing that name over coming up with my own.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.