You never mentioned linkage : that is the crux of my point. Once the
program is built it cant "just rub because its done in assembler". It
needs to be linked against the target OS or run in an
emulator/wrapper.
But it doesn't have to be a full emulator. Just has to be a replacement
API, isn't that what WINE is all about?
A minority of people.
Most people write to the tookit/native API withing the C program. That
brings snappiness and performance.
Well, that's not entirely true. The majority of the time applications
are waiting on IO. There's no point having a human interface that's
incredibly snappy, really no point, it's waiting for the user to press a
button, which might happen as little as once an hour. Pointless to spend
2 hours writing an interface in C when a 10 minute perl job gets it
done.
Then put the real work in C code that's easily portable (network and
other IO work using simple libraries where possible).
You wouldn't write, for instance, a word processor with a perl/python
front end.
No but perhaps the smallest of bottle necks is the database, which most
programs will have in one way or another. This is often written in
c/c++. Most perl programs use BDB/DBI in one way or another, that part
can be written in anything one likes. This method is great, I can script
something up, that's rather intensive on the database, give it to
someone else, or run it on another architecture and through the glory of
CPAN we can be sure that the database side of things is efficient.
Similar applies with python, but they don't have such a great resource
as CPAN.
Reagrdless : without the XP emulator, "intel code" will not "just run"
on a Mac. The OP was incorrect in the way he phrased it.
We're not still talking about that though.