Yes, it's true that the user can achieve his goal with the provided tricks, but the problem is more than a technical issue. The problem is misunderstanding what a phone number really is.
A phone number is not really a number, there is no sense in performing arithmetics operations with them. Phone numbers are codes, which usually happens to be represented like numbers, but that's just a convention. Maybe, in the future, phone numbers include letters too; in fact, international prefixes begin with a + (plus sign) or with 00, indistinctly. So, the adequate way to store a phone number is using a String.
Before coding, it's important to do some thinking about the nature of the things we want to translate into software, so we can choose the most suitable structures to represent them.
No hay comentarios:
Publicar un comentario