Re: Guy Steele interview in DDJ



Ulrich Hobelmann <u.hobelmann@xxxxxx> writes:

> Matthias Buelow wrote:
> > Ulrich Hobelmann <u.hobelmann@xxxxxx> wrote:
> >
> >>An MMU, which is a prerequisite for Linux to run, will.
> >> How come the programs on your Unix or Windows box can't access
> >> hardware directly, even if they're written in C?
> > Of course they can, see iopl(2), ioperm(2).
>
> I suspect that those calls check your user privileges first, so you
> can't just write code that accesses arbitrary hardware. A cellphone
> vendor could also make sure in firmware/hardware that only legal
> frequencies are sent. Otherwise, YOU are breaking the law, if you
> patch your Linux kernel to do illegal stuff with it.

I hope that you are only breaking the law if you are transmitting
illegally. (The other possibility would be that it's criminal
o create a device which might be capable of breaking a law,
regardless of intent or anything that actually happened.)

> That's not the problem of the phone company.
> And how would a Java API prevent this any better than a C API?

It doesn't have to do with the API (except insomuch as Java APIs
do not accept machine pointers). Third-party Java applications are
restricted by the JVM, but to restrict actual machine code requires
hardware that can trap inappropriate references and instructions
(and an operating system to handle them). Java represents a small,
portable, protected OS, which doesn't require sophisticated hardware,
and which is also a language that has lots of software market share.

I don't see any advantage to supporting C on phones; Java seems
preferable in all respects. There's enough memory and CPU power,
and you don't need protected mode CPUs and an OS. It's not clear
that the kind of applications envisioned running on phones would
greatly benefit from being written in Lisp, particularly, either.
What is important are standard libraries for piping around certain
kinds of data, doing encryption, and pretty simple user interface
libraries.

In the near term, I think phones are just going to be terminsls,
and any really interesting programs would be on network servers.
Some phones are also PDAs, and there might be more sophisticated
applications involved. For those devices, it might make sense to
run an operating system that supports more than just Java.
But again, most people consider Java at least adequate for even
those applications, so a conservative business decision would
suggest that the platform does not need to be upgraded.

Lisp, even for small and simple applications, is a nice way of
expressing programs and having them be maintainable and evolvable.
But it shines when applied to less well-defined, more evolutionary
programs. I'd like to be able to use it on phones, but it would
be more appropriate and desirable on the server-side of things.

Besides, one could write most Lisp programs in a way that
would make them ammenable to translation into Java.
I don't know how good the JVM targetted Lisp compilers are.
It would be nice if the condition system was usable,
if there wasn't too much overhead on all kinds of
things (for example, multiple values, closures, etc.),
and maybe even if multiple inheritance code was automatically
translated into single-inheritence patterns.
Or you could just limit yourself to simpler Lisp programs.
You would still get macros and many features.
And then both your server and client code would be in Lisp.
.