3 ms·
In practice, people use increasingly smaller subsets of JavaScript to transmit data. For example, a common pattern is to transmit (numeric) user IDs as strings
by cbhl 10y ago
In practice, people use increasingly smaller subsets of JavaScript to transmit data.
For example, a common pattern is to transmit (numeric) user IDs as strings so that they don't get mangled by floating-point precision issues with large numbers. You see both Twitter and Facebook APIs do this, for example.
- Senji 10y agoModern languages should feature a GUID type in the standard library.
- zodiac 10y agoI've read that you should treat IDs as strings anyway because you want to discourage incrementing IDs, adding IDs together etc. Anything else you want to do with integer IDs, e.g. comparing, can be done with sting IDs as well.