The Twitpocalypse is Near: Will Your Twitter Client Survive? Twitter tweet IDs will shortly tick over past the maximum signed 32 bit integer, potentially breaking applications. I learnt this lesson when the same thing happened to Flickr photo IDs: never store numeric IDs from external systems as integers, always use strings.
Why use strings where you can use 64-bit integers? Strings may be handy, but they are also slower, require validation, use more memory, are harder to sort. "Always use strings" sounds pretty presumptuous.
Sam Hocevar - 11th June 2009 10:57 - #
If you use strings you're safe against any future changes in ID format. Using integers is presuming that the ID will always be an integer of some sort.
If you don't need to do math with it, and memory isn't a major concern, opaque (i.e. string) IDs are better.
Jeremy Dunck - 15th June 2009 17:07 - #