Explore the reasons why Pharo, a powerful programming language, could potentially shape the future of software development. This post delves into the features and benefits of Pharo that make it a strong contender in the tech industry.
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 current state of the art in programming is stagnant, bordering on archaic. Developers use Byzantine languages like C++, Scala, Swift, and Rust. Or they use arcane, difficult-to-learn languages like Haskell, Perl, and JavaScript. They use mammoth IDEs like Visual Studio, Eclipse, and Xcode to manage complex build processes. They’re trapped by the traditional edit-compile-test-debug cycle that wastes enormous amounts of time. They’re stuck dealing with vast collections of files and folders — their source code scattered all over Creation.
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
Everybody has heard of Smalltalk. This venerable programming language has had a long and illustrious history. It was the first programming language to popularize object-oriented programming (or OOP). Remember the famous August 1981 BYTE cover? Its DNA can be found in nearly every major language in use today: Java, Python, JavaScript, C#, PHP, Ruby, Perl, Objective-C, Groovy, Scala, Delphi, Erlang, Dart, CLOS, etc. C and C++ are the notable exceptions.
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.
Another thing that Smalltalk is renowned for is 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.
Also, 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
- JavaScript — 15,929
- 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
As you can see, Smalltalk easily trumps JavaScript, Java, Python, C#, and Ruby. The interesting thing about this study is that it goes beyond simple coding and programming; it takes the entire software project into consideration, which is what business executives care most about. They want to know the full cost of applications and their complete schedules from requirements through delivery. They also want to know multi-year maintenance and enhancement costs plus total cost of ownership (TCO).
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 fantastic for web development, thanks to PharoJS, Seaside and Teapot.
Pharo is well-suited for numerical computing, data science and machine learning, thanks to PolyMath, Roassal and Numerical Methods with Pharo. People are working on TensorFlow integration.
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!
With Pharo, software development can be much more pleasant and much more productive than using conventional tools like Java, Python, JavaScript, C++, etc. It ought to point us toward the future.
Don’t miss a beat with The Cohort!
We’ll send you the latest Tech industry news, SWE career tips and student stories each month.