Smalltalk: An Entrepreneur’s Secret Weapon? (2020)
Smalltalk is fun, but after having programmed with it for a year (Pharo only), I don&#x27;t fully agree with the hype. And in certain cases, I feel the hype is undersold. But I&#x27;d love a bit more nuance. In my opinion, if you really want to convince the hardcore crowd on anything: nuance as best you can so people have an accurate sense of what they&#x27;re getting into. I can talk a lot more about Smalltalk, but this comment got big enough as it is. I think in certain cases it can definitely be a secret weapon.<p>&gt;  The syntax is ridiculously simple. It can be learned in its entirety within 15 minutes!<p>Right, and then you learn that things like branches, loops and similar things are method calls. So it&#x27;s not just the syntax you need to learn, the included libraries have things like: ifTrue:, ifTrue:ifFalse:, ifFalse:. There is also ifNil: and ifNotNil:. And IMO there are too many ways to do things. In order to be able to program, you need to learn these things as well.<p>&gt; The second major benefit is Smalltalk’s live coding capability<p>The following issues are not all REPL issues but this quote made me think of the issues that I&#x27;ve encountered.<p>There have been two instances where it wasn&#x27;t fully live. For example, when I played with Roassal, I couldn&#x27;t single step the animation through (whereas in an old Smalltalk demo this actually is possible). Or in seaside: the moment where a dynamic variable can&#x27;t be evaluated properly because it spawns a different process internally and doesn&#x27;t give the same value as the original process. The only way to fix that is to create a temporary variable and inspect that variable. It&#x27;s an okay workaround, but the live coding ability or that seamless feeling of you can evaluate anything everywhere and debug it (with debuggers in debuggers in debuggers in...), yea... not always. The moments where it&#x27;s possible (95% of the time) it is indeed magical.<p>Also, why can&#x27;t debuggers time travel? Like, is that too much to ask for a language that prides itself on being image-based &#x2F; live everything &#x2F; debug everything? I know people have worked on it, but I find it odd that it doesn&#x27;t exist yet in the actual language. It must not be easy to make, but then again: many things of Pharo&#x2F;Smalltalk have not been easy. This means it&#x27;s a matter of priority. It should be higher.<p>&gt; The third major benefit is Smalltalk’s purity, clarity, and consistency in its object-oriented model. Smalltalk is the easiest object-oriented language for this reason, far surpassing C++, C#, Java, Python, and Ruby.<p>Oh is it? I&#x27;d agree it is. But please stay objective though. Many things are played up as objects by the VM, but they <i>aren&#x27;t internally objects!</i> I wouldn&#x27;t know examples as I don&#x27;t know the internals well enough, but I&#x27;ve talked to people that did on the Pharo Days. They told me. When you look in kernel code, there are pragma&#x27;s just below the method signatures that betray this.<p>&gt; Smalltalk’s object-oriented nature makes it supremely maintainable and scalable without the headaches imposed by other object-oriented languages.<p>It does, in my experience.<p>&gt; The fourth major benefit is Smalltalk’s system image. The image is a snapshot of an application’s total execution environment. It allows you to save the execution state of your program and to resume execution later on at your convenience. This is terribly handy.<p>Well, be sure to back it up. It can also randomly crash. Text doesn&#x27;t crash (though your text editor might. Hello VS Code ;-) ). The snapshot is amazing though. Going down the callstack and having every variable live, where I can interrogat- I mean interact with it. It&#x27;s also awesome to put the debugger open live and just rewrite a method, replay the method and bam it works, debugger never closed. Can other languages do this? Probably. However, in Pharo this stuff is a first class citizen and you can feel it in the quickness of things (when it works that is, I already gave a few examples where it doesn&#x27;t).<p>&gt; Smalltalk’s image also makes software deployment a breeze. You never have to worry about installing and configuring the numerous software components (like libraries and frameworks) that constitute your application in production.<p>Well, for my scraper projects? Yes! True. For deploying a scalable web application? As far as I understand it: you have two options. You spin up hundreds of Smalltalk images that are ready to serve requests (yikes!). Or you use GemStone, which is another Smalltalk with an object-oriented DB designed for scalability. Smalltalks are mostly interoperable, until... they aren&#x27;t! :D So there&#x27;s a lot of glue code for the second option.<p>Though, I&#x27;ll say this: for creating hackable games (that you can just live program and alter) and personal scrapers... Yea, deployment is amazing.<p>&gt; For data science, you have tools like PolyMath, Roassal, and Moose. For machine learning, you can use TensorFlow and Keras.<p>Don&#x27;t forget: <a href="https:&#x2F;&#x2F;github.com&#x2F;pharo-ai">https:&#x2F;&#x2F;github.com&#x2F;pharo-ai</a> :D<p>------<p>The cool stuff that isn&#x27;t talked about enough. Programming in Pharo makes me look different at software. It makes me more critical of GUIs of text editors and makes me look more critical at file-oriented programming. I&#x27;m a JavaScript fan too, but I find it odd that the Chrome debugger doesn&#x27;t offer text-editing out of the box. It should! You can somehow make it happen? Why not make it happen out of the box. If Pharo can, why not a big well-funded thing like Chrome?<p>I also like how Stackoverflow almost has no answers, so I need to think more deeply about my own answers. It molds me more into being an actual software <i>engineer</i> rather than a &quot;call the function of this library please.&quot;<p>Also, you sometimes get confronted with the VM, so your &quot;stack-depth&quot; is deeper than most web dev as you&#x27;ll inadvertently pickup some VM things, which is basically computer architecture stuff.<p>In short, Pharo cares more about cognitive ergonomy for the programmer. Other languages don&#x27;t seem to do that, they seem to outsource that to tool makers. It&#x27;s Apple vs any other PC (tight integration vs making something extensible). Both approaches are valid, but since the tightly integrated perspective is underrepresented in the programming realm, I&#x27;d love to see more attention to something such as Pharo or similar projects.