Jon Ellis <Jon.Ellis_at_Sun.COM> wrote:
> Robi Karp wrote:
> > At the risk of starting a religious flame war, which I certainly don't
> > want to do; Perhaps the solutions is to look at "old school" again -
> > compiling for specific platforms.
> I'd be interested in hearing how you think that would be an
Consider a reasonably structured program, in any language:
- You have all the "common" stuff in one part of the program
- You have all the stuff you might want to change in some other,
abstracted, part of the program.
So you would have the application logic, the "business" part of the
application (as they call it) all together in one part of the program.
It will be common to all implementations of that application, because,
by definition, it is the algorithmic / business end of the application.
The OS / environment dependent parts of the application will sit in
some other abstracted part of the program. You will (most likely)
need to have different implementations for different environments but
even then the differences may not be that great. And these days, as
different OSs get closer to each other those differences will be
smaller than, say, 10 years ago.
Its very much the same model as what languages like Java (or FlashLite
or C# or Python or Perl or ....) do now anyway, except that the
abstraction bit is in the VM and, in theory at least, the application
does not need to change.
Except its not working properly.
You need to write specific sections of code for different phones with
Java too. So there's that advantage gone.
FWIW they said the same thing about WAP at the time too.
The main advantages of compiling your own program are:
1. Speed. I'm sure that there is evidence and counter evidence
and counter-counter evidence to say that a JVM is as fast, if not
faster, than a compiled C program. But I don't believe it :) My
experience has shown me otherwise.
2. Control. You can be in full control of the environment down to
very low levels (in C / C++ anyway).
3. Portability. Yes, that's right portability. A language like C is
far more portable than, say, Java. With Java you are at the mercy
of the JVM vendor, Macromedia in the case of Flash etc. Now I'm
not suggesting that you want to write a Java application for the
Texas Instruments c4x family of processors, but you could in C if
you wanted to. Pick a platform and I will find you a C compiler.
Is it an accident that all compilers, virtual machines and the like
are bootstrapped in C?
So my point is this: If you have to write portions of code that are
platform specific anyway, why not use the smallest, fastest (best
looking :) language you can?
You asked how would using compiled programs be an improvement
[over interpreted ones]. From a pure technical standpoint I think I
have answered that.
What I see as the true strengths of Java, C#, Flash etc. are
non-technical. What they have is a massive commercial backing driving
tools and community. Java has Sun, Flash has Macromedia and C# has
Microsoft. Python kind-of has Nokia. No one of those languages is
"better" than the other. What they have over C is very very good
tools and very very good, easily accessible resources. Flash(Lite) is
popular because of the rich graphics / development tools that are
out-there and understood. Java is popular because of the huge
community surrounding it. C# is popular because Microsoft said so :)
So that's my 2c worth.
- Robi Karp
Fluffy Spider Technologies Embedded Linux / FancyPants
http://www.fluffyspider.com/ Linux / Unix / Wireless / Real Time
phone: +61 2 9281 9055 fax: +61 2 9281 2944
Received on Thu Jul 21 14:50:11 2005