35 ms·
Memory model and byte order is enough to add breakage to stuff written in all of those languages.
by MichaelGG 9y ago
Memory model and byte order is enough to add breakage to stuff written in all of those languages.
- problems 9y agoI believe Java and C# enforce specific byte orders to get around this issue, so I doubt you'll see a problem there unless interacting with C++ libraries.
- MichaelGG 9y agoNot if you're converting bytes into integers, for instance. E.g. https://msdn.microsoft.com/en-us/library/system.bitconverter.toint32(v=vs.110).aspx https://msdn.microsoft.com/en-us/library/system.bitconverter... - it's arch specific.
- problems 9y agoInteresting, similar functions in the Java world are always big endian: http://docs.oracle.com/javase/6/docs/api/java/math/BigInteger.html#toByteArray%28%29 http://docs.oracle.com/javase/6/docs/api/java/math/BigIntege... Seems like a rather poor decision on Microsoft's part. Fortunately rather few things interact with data this way anyways, most serialization formats are text based or include endian information.