ChiMu  
 
Menu Edge About   Products   Services   Projects   Publications  
  Publications       TOC Next Next Page

SmallJava

Using Language Transformation to Show Language Differences

Table of Contents

Overview and Introduction

In this document I will compare and contrast Smalltalk and Java using a somewhat unusual approach: I will transform one language (Smalltalk) into the other (Java) by a series of small steps in an intermediary language (SmallJava). With each step I will discuss how the new properties of the intermediate language compare and contrast to the properties of the previous version of the language.

The reason to use this approach is it allows two languages' features to be compared without the baggage of all the other differences in the languages. Frequently language discussions are difficult because there are so many differences in syntax and unrelated semantics between the two languages that discussing a single point is impossible unless all parties are fluent in both languages. The approach of transforming a single language removes this particular hurdle to analysis. In addition, by using two publicly known languages as "end-points", the intermediate language will also be very familiar.

The reason I can use this approach is the incredible amount of similarity between Smalltalk and Java. This similarity is surprising because the syntax of the languages look very different and, more importantly, because Java is called "statically typed" and Smalltalk is called "untyped" or "dynamically typed". But the similarity is there at the core and by doing the language transformation we can have very concrete examples of what terms like "statically typed" and "dynamically type" mean in the context of a "single" language.

This document will require at least introductory background in both Java and Smalltalk. Basically the syntax and major concepts of both languages should be familiar to you. If you get lost during the postings I suggest you look at FAQ's and book related postings for "comp.lang.smalltalk", "comp.lang.java.programmer" and "comp.object" [using www.dejanews.com might be the easiest approach]. Although I don't ever consider a single book to be enough for any language, my current favorite two books may be:

    Smalltalk-80: The Language and its Implementation.
        Adele Goldberg and David Robson.
        Addison-Wesley, Reading, MA, 1983.
    The Java Language Specification.
        James Gosling, Bill Joy, Guy Steele.
        Addison-Wesley, Reading, MA, 1996.

But these are not exactly introductory books and will not be the best choices for all readers.

 
Publications  TOC Next Next Page