Eliran Gonen <[EMAIL PROTECTED]> writes: > It was just an example. Generally, interpreted languages are doing quite > a good job when it comes to portability.
This statement is made so often (also about Java, which is not interpreted, but I'll take some artistic license here and lump it all together), that I think it is worth pausing for a second and thinking about what it means. The actual implementation (such as JVM or python itself etc) that is necessary to run your program written in such a language is normally written in a language like C. Someone has taken great care to guarantee (bugs notwithstanding) that whatever you write in Java or Python will be portable *across all the platforms that the core implementation works on*. So "portable" in the Java/Python/etc sense means *portable across a limited, albeit maybe wide enough, range of platforms*. This is a very different notion of portability than that of, say, ISO C. Since a JVM is just a particular C program your Java application will be necessarily no more portable than an ISO C equivalent[1][2]. "No more" means, of course, "less or equally". Equality can only be attained if the JVM is written in strict ISO C *and* all your target platforms can accomodate both JVM (or Python, or whatever) and your applications in terms of resources and facilities. >From here you can easily come to the conclusion that there may be lots of cases where to write portably you cannot use Java or Python or Ruby or whatnot. It simply depends on what you mean by "portable", and what your needs are. I am not trying to argue that Python or Java are deficient in any way. I am only pointing out the fact that when blanket statements like "You want to write portably, write in Java" are made, it is worth thinking of what it actually means. [1] One can say that the advantage of Java for the programmer lies in the lack of a superset of the spec that includes implementation dependent and other non-standard stuff, so the programmer does not have to think, "is this statement portable?" all the time. This is true, but only to the point when you recall our favourite company's "embrace and extend" philosophy that makes them so good at introducing incompatibilities in everything. I don't really follow, but didn't they win their latest round agaist Sun as far as Java compatibility is concerned? [2] Another great strength of Java and python etc is that there is a minimal set of functionality that every compliant implementation has to support, so you are at little risk of writing something that will not be supported. This is in contrast to, say, C++ where it is amazingly easy to write something perfectly standard that will not be supported on some important platform (that will remain unnamed). I don't know if there is an "embrace and truncate" philosophy or plans thereof in any quarters, but we may all live to see that day as well. -- Oleg Goldshmidt | [EMAIL PROTECTED] ================================================================= To unsubscribe, send mail to [EMAIL PROTECTED] with the word "unsubscribe" in the message body, e.g., run the command echo unsubscribe | mail [EMAIL PROTECTED]