Hi, I would like to port Java code to Smalltalk. Thus, is there any references for performing such an action? I quess my main concern would be Java's packages (i.e. their name spaces). Also, most of the classes in Java that I need to convert follow the following pattern:
public class className1 extends className0 implements className2 { ... }
If anyone has any references and/or examples, please let me know. BTW, I'm using Squeak Smalltalk 2.8a.
Thanks,
-Conrad
__________________________________________________ Do You Yahoo!? Talk to your friends online and get email alerts with Yahoo! Messenger. http://im.yahoo.com/
In general you won't find naming collisions between Java code and Squeak's library. If you do run into that problem, we can help you learn namespaces in Squeak, or you can simply choose noncolliding names for the time being.
Here's some interesting stuff you should know when porting the code:
1. Extends is just like the subclass message in Squeak. When you create a new class, you extend another just like in Java.
2. Interfaces are "unnecessary" in Squeak. There are discussions for how to enforce them, but for the time being, just implement the same methods and ignore the interface specs. Everything will work just fine.
3. If you extend any base classes in Java (likely) you will have to find out what sort of things you have to add or override to do it correctly in Squeak. This involves reading the image as well as reading some Java source code in src.jar.
4. Smalltalk has latent types, so drop virtually every typing remark in Java. There are no casts and no primitive types in Smalltalk. Fixed-precision integers expand to bignums when they need to. Get familiar with the way the code works in Squeak.
5. Many things that are done in Java are not Smalltalky. So, you'll want to see how things are done in Smalltalk before you start. Read the image a lot, it's really important that you do so.
-John
-----Original Message----- From: Conrad Taylor [mailto:conradwt@yahoo.com] Sent: Friday, April 28, 2000 3:19 PM To: squeak@cs.uiuc.edu Subject: Porting Java To Smalltalk?
Hi, I would like to port Java code to Smalltalk. Thus, is there any references for performing such an action? I quess my main concern would be Java's packages (i.e. their name spaces). Also, most of the classes in Java that I need to convert follow the following pattern:
public class className1 extends className0 implements className2 { ... }
If anyone has any references and/or examples, please let me know. BTW, I'm using Squeak Smalltalk 2.8a.
Thanks,
-Conrad
Do You Yahoo!? Talk to your friends online and get email alerts with Yahoo! Messenger. http://im.yahoo.com/
squeak-dev@lists.squeakfoundation.org