Over the past several decades, we’ve seen numerous programming languages emerge to promise us a glorious new future in software development. Languages such as Ada, Eiffel, Ruby, Java, Scala, and more recently, Clojure, Go, Rust, Kotlin, and Swift. They’ve all fallen short of the ideal. They’ve failed to give us the tremendous boost in programmer productivity that we crave. They make development more tedious and time-consuming than it has to be.
These languages also do not encourage the democratization of programming. For too many beginners, especially the “non-technical” types, they impose significant hurdles. Even the much-vaunted Python is not without its quirks and oddities; yet, it’s pushed at colleges and universities.
Trapped By Our Past
The result is a lost opportunity for vastly greater development productivity and more pleasant programming for the less technically inclined.
In the last decade or so, language designers have been seeking the Holy Grail of programming languages. Their ultimate goal? Create a language that was relatively simple and easy-to-learn, presented low cognitive resistance, and amplified programmer productivity.
Enter Pharo. It joins the ranks of Elixir, Go, Nim, and others for easy-to-use programming tools.
Back to the Future
Smalltalk also gave us the very first graphical IDE (Integrated Development Environment). To this day, it remains much simpler and easier to use than Visual Studio, IntelliJ IDEA, and Eclipse. Not only that but Smalltalk’s graphical IDE was the very first to support live coding and debugging in a very simple and elegant manner. None of today’s popular IDEs can do this as well, if they can do it at all.
Live coding and debugging practically eliminates the traditional edit-compile-test-debug cycle.
Smallalk is image-based. An image is a snapshot of memory containing all the objects in the system at a given time. This image can be saved to disk and in so doing, you preserve or persist the complete execution state of the program, allowing you to resume execution at a later time from exactly where you left off! This is terribly convenient and a huge timesaver for a developer.
A Smalltalk image is comparable to the system image in VMware or VirtualBox. A VirtualBox image can contain Windows or Linux or some other operating system, and as in Smalltalk, it can be saved to disk and resumed later on. Thus, Smalltalk is not as alien as many people believe.
Smalltalk is renowned for its utter simplicity: it’s all based on message passing between objects. The language’s entire syntax can fit on a post card!
This makes Smalltalk exceedingly easy to learn and the language exquisitely beautiful. It reads almost like natural language but without the excessive verbiage of, say, Cobol. This is thanks to the use of keyword messages: keywords provide important linquistic clues that help to describe what you are doing. Unary messages perform a similar thing, for example, self size and each class name.
Smalltalk is completely reflective. This confers on the language incredible flexibility and extensibility, the kind of power one usually associates with Lisp but is present in Smalltalk, as well.
The Killer Advantage
According to Namcook Analytics (Table 16), Smalltalk is one of the most productive programming languages in the world (measured by “economic productivity” in terms of number of work hours to deliver 1,000 function points):
- C — 26,273
- Fortran — 22,394
- Forth — 14,636
- Haxe — 14,636
- Lisp — 14,636
- C++ — 12,697
- Go — 12,697
- Java — 12,697
- PHP — 12,697
- Python — 12,697
- C# — 12,309
- Dart — 11,620
- F# — 11,312
- Ruby — 11,312
- Erlang — 10,758
- Elixir — 9,845
- Haskell — 9,845
- Julia — 9,465
- Perl — 9,465
- Delphi — 8,289
- Objective-C — 7,848
- Visual Basic — 7,848
- Eiffel — 7,156
- Smalltalk — 6,879
Right in front of our faces, we’ve been staring at the future of software development for nearly half a century.
The Modern Smalltalk
The best and most modern example of Smalltalk is Pharo. The language is only 9 years old, making it as contemporary as Clojure, Elixir, Haskell, Julia, Kotlin, Nim, and Rust.
Here’s what the Pharo IDE looks like:
As you can see, the Pharo IDE is much simpler and cleaner than Visual Studio and Eclipse. Even children can use it without difficulty! It’s almost toy-like but at the same time, it’s incredibly powerful.
Pharo is great for Internet of Things and embedded applications. Here’s a programming tutorial based on IoT: Learn How To Program.
Pharo is being used to fight Ebola!
Pharo can even be used to implement an operating system, for example, PharoNOS.
Is there anything Pharo can’t do?
Where do we go from here?
Pharo has modernized Smalltalk for the Twenty-First Century. It now has a command line mode so that you can use text file-based tools such as source code control and static code analyzers. It even has a tool called Iceberg to integrate with GitHub. And Pharo is just getting started!
So you can have the best of both worlds. You can have your cake and eat it, too:
- access to conventional file-based tools
- a powerful, easy-to-use, image-based, live coding environment that can amplify programmer productivity up to five-fold!
(Originally published at The Cohort.)