Vadim Vygonets <[EMAIL PROTECTED]> writes:

> Quoth Oleg Goldshmidt on Fri, Jul 04, 2003:
> [snip snip]
> > 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.
> 
> Which is only portable across a limited, albeit maybe wide
> enough, range of platforms which have a C compiler (which happens
> to be a widely implemented language, but I don't think it exists
> for PalmOS, for example (PalmOS C is not ISO C, if I'm not
> mistaken)).

In general no, you do not have to have a C compiler *on* your target
platform. You can compile elsewhere. The main difference is that you
do not need an external program such as JVM to *run* your code in this
case. 

I have never owned a Palm or written code for it, but I do think a lot
of C/C++ code has been written to run on PalmOS. AFAIK a GNU toolchain
for PalmOS is widely used

http://www.palmos.com/dev/tools/gcc/

A similar development scheme is used for other embedded platforms
(Tornado for VxWorks comes to mind). 

I am not sure, but from

http://www.palmos.com/dev/tech/java/ 

it looks like java is not available for PalmOS yet (which is then a
case in point), but I cannot be certain that this is up to date.

Of course, you have to use the PalmOS system API to write for PalmOS,
and FubarOS system API to write for FubarOS. But that's the point - you
can. In Java, you will have to wait till someone else develops the
facilities. Doesn't that bring you back to a familiar argument? ;-)

Of course, once Sun or IBM or someone add PalmOS to the list of
supported platforms you will be able to run your existing code 
on Palms *without modifications*, which is great, but it's a somewhat
different kettle of fish, IMHO.

> Also, to write a portable ISO C program you must use only a small
> subset of libraries, which is not nearly useful enough, 

I never saw this as much of a restriction. And in most code I saw that
deviated from ISO C it was not necessary at all.
 
> There are still issues like different formats of filenames

That is external and is the same for any language, so this does not
discriminate. And in the case of embedded platforms with no disks or
files it is not an issue.

If anything, Java assumes more about the host filesystem than others
because of its packaging scheme. C rightfully says that the filesystem
organization is implementation dependent. I am curious if there is a 
filesystem under development somewhere that will not have hierarchical
structure...

-- 
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]

Reply via email to