Tamas Rudnai wrote: > On Fri, Jul 1, 2011 at 7:55 PM, Gerhard Fiedler wrote: >=20 >> It's actually not so difficult to write cross-platform apps in C++, >> probably not more than in any other language. (At least >> Windows/Linux/Unix.) The few platform-specific functions you need in >> non-GUI apps are easily wrapped -- and doing this takes usually >> about as long as understanding what VM wrappers do differently on >> different platforms.=20 >=20 > I am sorry but I do not share this thoughts with you. I was actually > developing antivirus engine on multiplatform environment and it was > quite difficult sometimes as per the differences in many aspects like > big/little endianness, 32 or 64 bit (with sometimes huge difference > in memory management too such as crashing if app is trying to > accessing to a memory not dividable to 16 byte chunks). Also compiler > differences are killers sometimes as well as shared memory > management, fifo, mutexes, message queues, signal handling and IPC in > general, how multithreaded and multi processing works and even deep > down to things like how to set parameters in the kernel related to > all of these things. And then we can talk about optimisations, one > thing works faster in one system, other on other system...=20 >=20 > Anyway, not impossible of course and there are many advantage over a > VM like Java, .NET, LLVM etc, but would not consider this as easy :-) I didn't say it is easy. I also mainly said that it's not that more difficult than in any other language.=20 Once you get into such fine details, a VM is often not much help, because it doesn't work /exactly/ the same on different environments. You still have 32 vs 64 bit (and often worse, as you may have a 32-bit VM running on a 64-bit environment), you still have all the differences in how exactly multi-threading and multi-processing works -- not inside the VM, but in the interactions of the VM with the system. The VM shields you from the system for most simple applications, but not so much anymore when you're stretching the boundaries.=20 There's probably a reason why there are so few anti-virus engines written in Java or Perl (to pick two of the more common multi-platform languages)... :) Gerhard --=20 http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist .