[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Portable Self?
On Tue, 30 Jul 1996, ian (i.r.) woollard wrote:
> I notice that when you want to execute Java you have to translate the
> Java code into byte codes so that they can be executed. However,
> there's nothing very special about the bytecodes that Java produces;
> in theory they could be written in any language.
I know this was done with Ada at some point, and that it worked.
> The problems I see are:
> - interfacing to libraries (presumably not too hard)
> - actually writing the compiler (presumably Jecels version of self is
> closest to what you want)
> - the dynamic nature of self code (e.g. potentially changing
> constants/code on the fly-don't know whether Java allows this sort of
> self modifying code!)
I agree that this would be excellent, and I also agree with the problems
I suspect the Ada project (a reference to which I could probably find if
someone wanted) worked well because of a tight mapping between Java
classes and Ada classes.
Unfortunately, the mapping between Self and java would not be so clean.
You can't change methods (code) on the fly. Java is very much a
You still could probably find a way to compile Self into Java. It
woudn't be nearly as fast as it might be if you had the tight mapping,
but it could work. And it really might help to get more people
interested in Self, which would be good.
(It kind of reminds me of a tradeoff in Scheme->C compilers: you can use
C functions to map Scheme functions, and the C stack to map the Scheme
stack, which works fine in every way EXCEPT continuations. So then you
have to compile Scheme to C with a higher level of abstraction.)
Java is more than a language; it's also a national obsession, a lot of
excitement, and a lot of hype. No reason not to take advantage of the
energy! In a sense, Java is also about an increase in interest in OO
programming and in good design.