st browser of Java code

Stefan Matthias Aust sma at kiel.netsurf.de
Tue Jun 2 19:53:40 UTC 1998


Jason Karney wrote:

>I thought it would be nice to have a class browser/development
>tool for Java that worked like Squeak's.... and the portability
>of Squeak would be anadvantage for development.

VisualAge for Java has some very nice (and powerful) browsers. The whole
system is heavily influenced by Smalltalk's tools. The debugger is
identical to the VisualAge for Smalltalk tool and VAJ even features a
scrapbook (aka workspace) where you can interactively evaluate Java
expressions.

I'm not sure whether the world needs yet another IDE. I think, the decision
about the best development tool is fought between the major players like
Symantec, Microsoft, IBM, etc..

>The ideas you mentioned sound about right. I envision a tool 
>that allows for classes to be rapidly "cobbled" together, and 
>(hopefully :-)) compiled by a call to javac. The embedded javavm 
>would be interesting, but I doubt anybody has the time for that :-)

You can also try to emulate the Java byte code instructions in Smalltalk or
try to cross compile them to Smalltalk byte code instructions.  ParcPlace
tried to do something similar with the FROST project, I think. Other
companies also tried this and from what I've seen I can say it can be done.
However while VisualWorks's VM is barely fast enough, Squeak would probably
too slow.

>Helge Horch wrote:

>> What a coincidence. No, not yet. But I have thought that a 
>> Squeak-based classfile browser for analysis, cross-reference
>> and disassembly would make a nice side project. (I also 
>> imagined a JavaVM inside Squeak ala IBM's UVM or Smalltalk/X, 
>> but that would exceed my alloted spare time.)

Interesting idea. For JAVISION (please excuse the shameless plug), a tool
read in and visualize both Java source and Java class files using UML
notation, that will be distributed by Object Insight
(www.object-insight.com), I wrote a class file and source file parser in
VisualWorks Smalltalk.  It's not that difficult to write. I cannot publish
that source code, but I might be able to help to recreate something similar
in Squeak.

>> I've also tried to retarget the CCodeGenerator for Java, 
>> but have only managed to open a can of ugly worms so far.

What's the problem? I once wrote a small translator for VisualWorks
Smalltalk (based on the ProgramNodeEnumerator) and it was not that
difficult. It can emit syntactial correct Java source, but it cannot
optimize types. For "3+4", it will generate "new STInt(3).add(new
STInt(4))". "'A' = str ifTrue: [...]" is translated to "if (new
STString("A").eq(str) == STBool.true) {...}" and so on. And it of course
assumes that the complete Smalltalk class library has already been
translated. To be honest, it's just a proof of principle and it's also
hacked together.


bye
--
Stefan Matthias Aust  //  Are you ready to discover the twilight zone?





More information about the Squeak-dev mailing list