A Crazy Idea (?)

Giovanni Giorgi giovanni.giorgi at mlab.disco.unimib.it
Fri Dec 10 08:54:23 UTC 1999


Hi Smalltalkers!

I have studied a bit the Virtual Machine of Smalltalk and Java, and I
have a small question...
Suppose we take a Java bytecodes (= ".class") with no native types (int,
char,etc) no final meyhods call, and no types error.
Take this correct, pure object-oriented bytecodes and put it in a
special Smalltalk VM:
this VM will not check the type signature of the methods, but can
unterstand Java bytecodes and execute it.
So we can have Java interpreted by a (very very special) Smalltalk VM.
WArning: I left out the details, and  some of this details can be VERY
important...
but IF this can be done and is right (I ask to you an opinion) we can
say some terrible (for Java) things:

  1. The Smalltalk VM don' t do type checking
  2. The Smalltalk VM don't waste time loading class files, checking the
     bytecode and so on...
  3. The Smalltalk VM architecture can take a little more time (message
     passing can be a little slower than indirect method call of Java, I
     suppose)

===> Smalltalk can be faster than Java (and in fact, interpreted Morph
is faster then compiled Swing...and consume less memory!)
But Smalltalk is more powerful, so....
is Java a nasty subset of Smalltalk?!

and more:

Can we do an acceptable Java implementation in Squeak Smalltalk??


Ciao ciao....
--
// Giovanni Giorgi           mailto:giovanni.giorgi at mlab.disco.unimib.it

// Master Thesis  at http://mars.sal.disco.unimi.it/~giorgi
// Student (& exTutor) at Depart. of Computer Science of Milan, Italy.
-------------------------------------------------------------------------





More information about the Squeak-dev mailing list