The Goo Editor

Goo is a new object-oriented, prefix-syntax programming language created by Jonathan Bachrach and others at MIT's AI lab.

The standard distribution comes with an excellent Emacs mode (including an inferior Goo process interface for experimenting with the language.)

However, I was interested in seeing if a useful Goo plugin could be created for IBM's Open Source Eclipse development platform. If you haven't checked it out before, you should take a look at their website and the various white papers and philosophical documents related to the how's and why's of Eclipse.

Although the Emacs mode has most features you would want in an editor, Eclipse offers lots of neat features not (yet) available in Emacs. The first screenshot below shows the standard editor along with a few of the Eclipse-specific features, namely the current line highlighting, and the Outline mode.

Screen 1: Example Goo Editing Session (with Inferior Console Open)

The second screenshot shows the editor with some of the outline data expanded. The outline shows different Goo programming constructs, categorized by their major types (Classes, Functions, Methods, Generic Functions, and Properties.) Each class and method shows its signature (or at least the best my simple parser can come up with).

Screen 2: Example Session showing Outline Data

One of the great things about Emacs is the ability to carefully customize it for your particular likes and needs. While Eclipse doesn’t seem to provide quite as much user-level customization (at least as far as I can tell), it does provide the ability to define very nice looking preference screens for use by non-technical folks.

Screen 3: Setting Preferences

The next screen shows configuration settings related to text hovering and completion hints. The important thing to note here is the "Goo Runtime" option – you will need to set this to wherever you untarred the Goo archive.

Screen 4: Eclipse Code Assist Preferences

Goo provides support for context-sensitive text completion. Based on the settings above, around one half second after typing an open-parenthesis "(", a drop-down box will hover below the text you are working on with options for completing what you are typing. If you continue to type letters it will home in on the best match. Hitting the "enter" key will fill in the selection.

Screen 5: Example Context Completion

Conclusions

Well, my initial impressions of Eclipse were positive. However, I did feel that the available tools and extension points were somewhat limiting. More than once I threw up my hands in frustration because of the (in my opinion) overly obscure object hierarchy. Often, useful objects were defined as "package" visibility which resulted in me having to copy various class files out of the JDT source pool to make part of the Goo hierarchy.

Furthermore, much of the really useful support classes were cast in an overly "Java" nomenclature (so that parts of the Goo Editor platform throws "JavaModelExceptions" and so forth.) Lots of useful support classes are buried deep in the Java Development UI tree -- these should probably be moved up to a higher-level library of some kind.

It helps to compare the relative sizes of the source code to achieve the various levels of integration. I ended up writing (and cut & pasting) around 250 Kilobytes worth of source files, not to mention copying some of Eclipse's icon files into my project directory. The corresponding Emacs code is about 165 Kilobytes. So, there isn't a huge difference in the amount of coding required to integrate in either environment. But you get lots of really nice bells and whistles with Eclipse, many of which I have not touched on in this brief document.

Overall my impressions of Eclipse are very positive. It's the first Java application I have been exposed to that has the speed and responsiveness (using IBM's alternative graphical toolkit) of a native application. I intend to continue working with it, and extending the Goo environment as I learn about more of its features.

Update 10-13-2003: The Goo environment is being ported to Eclipse 2.1 (and 3.0). It should be finished in another couple of days.