Hacker News new | ask | show | jobs
by elliotlarson 2339 days ago
As a long time Ruby developer I frequently hear older developers talking fondly about their experiences working with Smalltalk long ago. When I saw this post, I was curious enough to watch a video just now by a respected Ruby dev (who's admittedly new to Smalltalk and using an older version of Pharo): https://www.youtube.com/watch?v=HOuZyOKa91o. The video is short, but it looks to me like the advantage of developing in this environment is mainly that you can write a test, run it in a kind of debug mode, and when the environment encounters something it doesn't understand it gives you some options for creating something new like an object or a method to solve the problem. This seems kind of cool, but I feel like there must be more to it. Can anyone better explain the selling point, or share a video that highlights how this environment is so cool?
3 comments

There is no single selling point. Here are some surface things that I immediately liked:

1. You can download a single zip file (Pharo Standalone) and it will give you all the tools of a modern IDE without shitting all over your system and with faster startup than Atom, VS Code or even LINQPad.

2. The environment retains all its state across restarts. The editor stuff, the running state of the program - everything.

3. You have the same capabilities as the people who developed the language. You program, the run-time environment and the editor itself can be browsed and edited by the same set of tools, without any extra hoops. There is very little "magic".

4. The syntax of the language is designed so that you can create DSLs without using macros or pre-processors.

5. It's the only environment in my recent memory where I can do stuff without opening the web browser to search for something every 5 minutes.

6. IMO, breaking the system into four-tier structure made the whole thing much more tractable than infinitely nested directories or namespace hierarchies. I also like that there is no need to manage files with code.

The 'more to it' is the fact that you are always effectively in 'debug mode'. By default, there is no distinction between development and deployment in Smalltalk[1] so when something fails, you typically will get a debugger pop of the method at the exact statement where the problem occurred with the live state as of the moment of the problem. The entire environment is as static or dynamic as you want it to be since it's entirely malleable.

Since Ruby was largely inspired by Smalltalk, you'll find similarities in their views of OO and code. Where they fundamentally differ is in the environment since Smalltalk is based on a monolithic persistent image so it can do things like have the debugger, and other GUI tools, built in. All that video was showing was built in stuff from the Pharo image... other dialects have their own takes on the tools.

[1] You can create a distinction by removing the development tools and replacing their functionality with non-interactive logging/error handlers for production deployment.