portability
Cameron Laird
claird at starbase.neosoft.com
Tue Jul 31 10:38:01 EDT 2001
In article <9k5vec01p4b at enews4.newsguy.com>,
Alex Martelli <aleaxit at yahoo.com> wrote:
>"franck delarue" <franck.delarue at rd.francetelecom.com> wrote in message
>news:9k5u2c$p542 at news.rd.francetelecom.fr...
>> hello everyone,
>> i'm working on python on linux red hat and i'm wandering if all the code
>> that i've written would be portable to unix or windows (except the system
>> calls of course). I know that python works a little like java ( on a
>virtual
>> machine), but is Python as portable as java ?
>
>Python isn't quite as portable as Java, because Java by defaults
>shields you from all platform-dependencies, while Python's
>general attitude is to give you access to platform-dependent
>features -- which may not be there on another platform. So,
>writing portable, cross-platform code in Python, while quite
>feasible and not all that hard, DOES require more conscious
>attention and care than it does in Java (you can of course
>use Jython, Python for the Java Virtual Machine, in order to
>write Python code but get Java portability).
.
[correct details
on various irri-
tations]
.
.
>This is, unfortunately I feel, rather a good symbol of Python's
>overall approach to portability: quite achievable *if you work
>at it* (it's less work to make your Python code portable, than
>it would be for, say, C, or C++), but definitely a secondary
>issue (it takes a lot MORE work to make your Python code
>portable than it would take for, say, Java, or Tcl).
>
>
>Alex
>
>
>
On the other hand, Python is sufficiently close to
Java that there's a meaningful sense in which it is
*more* portable than the latter. It is this: if I
am an experienced Python coder, and I write some-
thing that I know to be portable Python, I can
reasonably expect it to run properly on HP-UX,
Win*, OpenVMS, maybe PalmOS, certainly SCO (or
whatever they're calling it now), all Linuxes, and
so on.
With Java, I have to fight for every JVM, and then,
once I've extracted it from a vendor, fight *with*
the JVM. Briefly, both the language and the poli-
tics of Java are sufficiently complex to make it
seem unlikely to me that we'll ever have reliable
implementations everywhere reasonable.
--
Cameron Laird <claird at NeoSoft.com>
Business: http://www.Phaseit.net
Personal: http://starbase.neosoft.com/~claird/home.html
More information about the Python-list
mailing list