I think Smalltalk is a wonderful technology that influence the past decades in programming. But not directly: its influence is not via its killer apps. Smalltalk influenced programmers. The Smalltalk mark can be traced in Python and Ruby design decisions. And many programmers have been touched by Smalltalk ideas. But Smalltalk, as technology, didn’t exploded. We can discuss the reasons: early “balkanization” of providers, no early open source implementation. My thoughts: it is too couple to its own “GUI IDE”, and it is a bit overwhelming (too many pieces).
I think that is time to explore alternatives path. In the past decades, I visited many technologies and languages, and in the past ten (more or less) years, I took again Smalltalk and tried to follow an alternative path.
My position: we should try a simpler Smalltalk. An Smalltalk not tied to GUI IDE, not tied to thousands of classes. A simple implementation that can access the rest of the world advances in programming.
More info in https://ajlopez.wordpress.com/category/smalltalk/.
But this post is not dedicated to review those implementation. Its purpose is to write down some ideas about how to create an Smalltalk, without struggling with the shrinking of a previous image.
The core Smalltalk should implement:
Object: the base object and class, with some base methods, like #subclass:.
Array: for arrays with numeric index, starting from 1 (to not break with Smalltalk tradition)
Dictionary: to map keys (names) to values
Access to native objects and types: to create them, to call type methods, to call instance methods.
First, a minimal implementation of some classes, that can be shipped with the initial implementation.
But then, and this is important: try to live in an ecosystem of packages. Instead of having all classes in the image, try to have an ecosystem of packages. Each Smalltalk application could define the needed packages, and then, the packages could be installed from the package ecosystem. In my implementations, I started to explore the use of NPM (Node Package Manager) to publish new package, and to install them per application, even with the use of explicit package version, so we have a less brittle ecosystem.
– Test library (with an initial assert method)
– HTTP server
– MVC web framework (I have a minimal sample using Node.js Express)
– Distributed messages (I have a naive implementation in C#)
In this way, the adoption of a package will be easy: not need of porting a package, only consume it, given the right dependencies in place. And, as in other technologies (Python, Ruby with gems, and notably, Node.js with NPM), each package can keep the description of the needed dependencies (NPM takes care of versions too).
I want to have an environment feature: that a class/package can load other classes, but only for internal use, without pollute the global Smalltalk environment.
I want to have an image running with the help of other image. That is, the Smalltalk VM should manage MORE THAN one running image. And one image could help another one. For example: one minimal image could have no compile method, but this method could be provided by the host image. In this way, a minimal image could be created, without any convoluted “shrinking” step. I already implemented this feature in my C# implementation.
In some implementations, I want to have an image (save and restore). But it is time to explore the development without the need of an image.
Any GUI should be created over the host environment. Use Windows.Form if your Smalltalk is running over C#. Or use another library, in Java (Swing? SWT?). But the idea is that the GUI management should be something clearly separated from the core implementation. Current popular Smalltalk implementations are too coupled with GUI management. Look at other technologies: Python, Ruby, Node.js, Go, etc.. There are lots of developers not using a technology so tied to a GUI IDE. And they are producing useful applications.
Angel “Java” Lopez