On Mon, Nov 15, 2010 at 7:46 PM, Aryeh Gregor <[email protected]> wrote: > That's evil. Isn't JavaScript meant to conceal machine details like > endianness? Couldn't we mandate that the conversion here must be > little-endian? Granted that it'd be slower on ARM and such, but > "slower" is way better than "causes the program to break". If the > performance is really needed, provide extra methods that convert in > big-endian fashion. Then those writing programs targeted at ARM, or > those who are willing to write different algorithms for big- and > little-endian, can use those instead. > > Or has this already become such a big and general problem that fixing > it is basically hopeless, and we're just resigned to everyone's > scripts breaking on ARM because they were only tested on x86?
(Actually, it seems like ARM can be either little-endian or big-endian. Apparently it can vary based on the device, and in some cases can even be switched on the fly. So if everyone just hardwires their ARM smartphones to little-endian, specifying that the function is little-endian should be even more harmless. Googling suggests that at least the iPhone is little-endian.)
