What do you think is a good idea to have an enumerator like this:
enum AvailableSpace {
Percent10,
Percent20,
SqF500,
SqF600
}
Question about the semantics of value names, i.e. both in percent and square feet. I really think this is not a good idea, but I could not find recommendations, etc. In support of this.
EDIT: This will be used to determine the state of the object — that is, as a read-only property to describe the state of the object. If we know the total space (i.e. the object itself knows), we have the ability to convert internally, so we either have only a percentage, or square feet, or both. The argument is that “both” are not a good idea.
This, of course, is an example, but the real problem is that some data providers send us totals (sq.f.) and other percentages, and my goal is to unify the user interface. I can make some approximations, so the exact values will be adapted depending on how accurately we want to present the information.
The question is only in the semantics of the value names, and not in the content - that is, if it is a good idea to put a percentage in the (potential) int enum.
source
share