Saturday 3 August 2019

A new Smalltalk

Java is amazing.  It's the most widely used programming language, and it deserves that.  Although the Java language isn't exciting, Java runtimes are awesome bits of technology, giving extremely good portability and very efficient multi-threading, memory management, and run-time optimisation.  This is why it is the platform of choice for so many languages, such as Scala, Groovy, and Clojure.

Smalltalk is the most productive and fun programming environment I have ever used.  It's a dynamic language, but the use of an 'image' (a live collection of objects) means that it's easy to do things that normally require a type system, such as refactoring and finding where classes and methods are used.

What could be better than to host Smalltalk on the Java platform?  Smalltalk would get all the advantages of Java's memory management and access to Java libraries.  It could also allow Smalltalk access to platforms such as Android and iOS. 

Smalltalk on the JVM has been tried before, but efforts have been rather incomplete - examples are Redline Smalltalk and JSqueak.  There hasn't been a full and efficient implementation. 

Smalltalk on the JVM could take advantage of the extremely efficient run-time optimisations that are even available for dynamic languages, via the 'invokedynamic' feature.  Such a Smalltalk could have pluggable GUI implementations allowing use of Swing or JavaFX, and the latter would allow Android and iOS ports from the same codebase.

So, I'm going to do this.  Primarily, I'm doing this because it will be fun and educational.  I want to learn more about Smalltalk and the JVM.  I want to be able to produce a Smalltalk that will run everywhere and is as reliable and fast as the JVM can make it.  Then, I want to have fun writing apps in Smalltalk again, after a break of decades.


No comments: