3 ms·
I feel like a lot of people will see that an just cast it to an int however.
by Igglyboo 12y ago
I feel like a lot of people will see that an just cast it to an int however.
- erydo 12y agoThat could happen but in a lot of strictly typed languages it would be non-obvious and special effort to do so. There's absolutely no justification to send ints when you have any reasonable chance of needing to change it to a string later. Besides, IDs in a public API fundamentally are not numbers. You don't add them, subtract them, multiply them, shift them, inspect any property of them besides equality, or anything. They're opaque tokens used to identify things with the server.