On Saturday, May 25, 2013 1:53:33 PM UTC+2, timh wrote:
But not python. It seems to cause the javascript front ends the most woe.
This is important to note if your application has a front-end using javascript.
It means that any id greater than 9007199254740992 will break, if you try to represent it as a javascript number. See t
his question on stackoverflow.
Strings will of course work. They do not support number arithmetic, but you should not need to do that on id's.
It is a shame that Google has not warned users of the appengine about this potential hazard.Of course, as appengine developers we know what we are doing, but it would show that Google cares about its customers. However, maybe there is nothing to worry about:
In the announcement it says: "These IDs are large, well-distributed integers, but are guaranteed to be small enough to be completely represented as 64-bit floats." The javascript specification says: "... all the positive and negative integers whose magnitude is no greater than 2^53 are representable in the Number type". Now, 2^53 is the largest exact integral value, so this might mean that things will work well if you represent id's as javascript numbers. Can someone from Google confirm this?