3 ms·
Whether or not a class can be reduced to an int is something to consider, but should not automatically proscribe the use of a class. What is way more important
by default-kramer 6y ago
Whether or not a class can be reduced to an int is something to consider, but should not automatically proscribe the use of a class. What is way more important is to carefully consider the API that you provide to calling code. Once other code starts depending on your decision, it becomes harder (or even impossible) to change. So you might decide to use a class for this reason, even if it can be reduced to an int.