In a program I’m working on, I’m trying to describe an item that was processed a certain way in a previous iteration. I want the function I write that is used to access this state to be as self-describing as possible. The function name could be:
wasProcessedAsMime()
or
isProcessedAsMime()
Which is more correct or makes the most sense? “processed” itself is past-tense, but I’m not sure if “was” or “is” is necessary before it. The former sounds more natural, but I’m not sure why. Are both valid? If so, what do each mean?
I was also told that hasBeenProcessedAsMime() would be the formally correct version, but I’m not sure if this is overkill 🙂
The way I see it, if the return type is Boolean (which it probably is), I would use isProcessedAsMime(), because that is conventional and helps with self-describing the function for the next person who maintains your code.