[squeak-dev] Smalltalk vs Eclipse

Ralph Boland rpboland at gmail.com
Fri Jan 22 06:40:45 UTC 2010


Lest I confuse you let me state that I STRONGLY prefer using the
Smalltalk (Squeak in my case) development environment to using
Eclipse.  It is also worth pointing out that Eclipse is a development
environment that works with multiple languages whereas in
Smalltalk the development tool and development language are
intimately connected so to compare the two is to compare apples
and oranges.

Nevertheless there are advantages to both and I wonder to what
extent I can have my cake and eat it too  (that would be an orapple
cake I suppose).  I should also point out that my discussion is abstract;
I am asking if it would have been better if Smalltalk had
been designed the way I propose and not should some Smalltalk,
say Squeak, now be modified to be so.

The thing, particular to this discussion, about Eclipse that I like
is that the Eclipse (image I will call it) is separate from the
application (image I will call it).  In Smalltalk the two images are
combined.  This means that a lot of code is encorporated
into your application image that you may not want.
Of course, before you release your application you can run a
stripping program or process that strips out code that is not
used in your application. (I have never done this but my
understanding is that this is possible.)

Never having done this I assume that stripping is not that
satisfactory because there is much code that cannot be
stripped out; certainly unused methods and likely unused
classes as well; the dynamic nature of Smalltalk means that
much necessary information to determine that a method or
class is not used is not available so such methods and classes
must be included in the application release.
Some may argue, that with all the memory processing power
available today, who cares; but I care.  For example, I would
like to be able to put a Smalltalk application into a linux pipe
as in:

a | b > c

where a or b or both are applications written in Smalltalk.
Similarly I would like to use Smalltalk applications in bash (Linux)
shells scripts or use it in other scripting languages. So it
may be important that my image not be unnecessarily
large as getting it started may take longer than what it
does once it is started.
Of course I could use GNU Smalltalk for this but is it really
necessary that I know/use two smalltalks?

I think the Eclipse model suggests an improvement to Smalltalk.
It seems to me that when you run Smalltalk ideally you would
run two images.  One would be the development environment image
and the other would be the application image.  When you started
a new project you would choose from a selection of start images
each including some subset of the development classes you
expect to need. There would also be a capability to copy entire
methods/classes/applications/other from the development image to the
application image.  Note that in this model there would be need to search
the code base of either image  (or both).   For example, I may want to find
implementors/senders of method  #doSomething  in the development image,
the application image, or both.  I think being able to search the application
code base only is especially useful.

An interesting example is if you were working on the development image
itself.  In this case you would of course make as your application a copy
of the development image (and its changes file).  Now, in principle you need
not worry about many of the situations in which you get into an infinite loop
because you have broken the development environment itself in some way
such as putting a halt message somewhere that get called every time the
debugger is called.
Yes, but what if your are modifying the debugger itself?  Well you need some
kind of command such as:

     #runAsDevelopmentEnvironmentOn: image changesFile: file   "A
metacircular interpreter anybody?"

I am not sure who this message is sent to.

I am not actually sure if this is a good idea either.  Perhaps if you
want to work on the development
environment you start your image with a special flag or simply no
application image.
The development image then becomes editable and there is no
application image;  The
development image and application image become one as is the situation now.

There are doubtless many problems I am not seeing here and even
many ways this may be a good idea that I have not considered.

Either way I would like to hear what they are.

How much of an effort would be involved in modifying some version
of Smalltalk (say Squeak) to work this way?   (I have NO plans to do this!)

How much of a benefit would such a version of Smalltalk really be?

Has this been done before, perhaps in some other language, and what
were the results?

(Constructive) comments most welcome.

Regards,

Ralph Boland



More information about the Squeak-dev mailing list