There is a semantic difference. Just because data is stored the same way, this doesn't mean it's the same thing. Dates
and Amounts
may also have the same internal representation (long
for a timestamp or fixed point amount of cash), but they're not the same. The char
array could as well mean a 16-bit image.
In object orientation, it's good practice to model objects based on what they are and can, and not by how they internally store their data. This allows you to encapsulate the data (and restrict or control (observer support) access with getters/setters, or even make the internal representation immutable or poolable), and provide appropriate methods for your objects.