
Learning Smalltalk is not a waste of time - mpweiher
https://medium.com/@richardeng/why-learning-smalltalk-can-never-be-a-waste-of-time-a45038b18427
======
shalabhc
The article itself might be a fluff piece, but Smalltalk is a worthwhile
investment of time anyway.

I believe I grasped the more interesting ideas in Smalltalk when I approached
it not as just another programming 'language', but rather as a complete
programming 'system' in itself - a virtual computer, if you will. Instead of
files, this system contains 'objects', which communicate with other objects
via messaging. The entire network of objects is transparently persisted and
implementation details are themselves represented as objects-with-messaging
(i.e. self hosting). The UI is just another mechanism to send messages
(clicks, keypresses) to some objects, etc.

It's unfortunate that something like Unix with it's primitive notion of files,
processes and 'stream of bytes' thinking has become the dominant environment,
rather than something like Smalltalk - where the objects are reflective and
communicate with semantically richer messages.

~~~
lukego
I am writing Smalltalk code lately. I find it useful to think of Smalltalk as
an operating system, like Linux or Windows or Emacs. It has a different way of
doing things, and learning this is both frustrating and rewarding. It brings
back vague memories of learning Linux for me.

It feels like a nice way to break out of the bubble of that Rob Pike famously
lamented in
[http://herpolhode.com/rob/utah2000.pdf](http://herpolhode.com/rob/utah2000.pdf).

~~~
shalabhc
Yes the analogy to an OS is good. Many language comparisons sadly miss this
because they just look at Smalltalk through a 'programming language' lens and
only see at a slice of the Smalltalk system.

Interestingly there is an Pharonos project (maybe defunct now?)
[http://pillarhub.pharocloud.com/hub/mikefilonov/pharonos](http://pillarhub.pharocloud.com/hub/mikefilonov/pharonos)

------
flavio81
Another Smalltalk article from the same author ("Richard Kenneth Eng"). He has
at least three articles where he considers Smalltalk the best language ever,
while simultaneously bashing Common Lisp (& other languages), with claims that
show his knowledge of CL is not even superficial.

Plus ignoring that the creator of Smalltalk, Alan Kay, is a fan of Lisp
himself and on the early 70s these two were the main languages for OOP and had
mutual influence. Not to mention that the early alma mater of Smalltalk, Xerox
PARC, was also a center of innovation for Lisp as well.

No problem at all promoting Smalltalk, but when articles are just clickbait-y
and have claims with no technical substance, they become articles for their
own sake.

------
cztomsik
I wonder if anyone would agree with me but my experience with (Smalltalk way
of) OOP is that it's extremely powerful and expressive but very hard to follow
(thanks to messaging).

Like in ruby, you can code "in english" but once you're trying to find a bug,
it's not easy to tell what is and is not possible to happen, you just have to
run it and see where it dies.

This is to some extent similar to macros. They are also very powerful but
should be used sparingly.

It's definitely great experience (I especially like the fact that what you see
in browser is not code but actual object memory which get serialized to
string) but you should be warned that this is not probably a good fit for
production applications done by bigger teams.

------
banachtarski
I can't help but feel there's sort of a strawman here. I'm not sure what
social circles the OP hangs out in, but I don't imagine anyone I know would
really lambaste my choice of language to learn in my fair time (or even as my
first language).

That said, I think I differ in terms of what I believe a language offers, and
given the criteria prescribed in the article, smalltalk is actually probably
_not_ a good choice. For example:

> Your first programming language will never be your only programming language

Yes, but for a first language, isn't it more pragmatic to learn a language at
the intersection of more popular languages? If you knew you were likely to
want to speak English, French, and Italian, would you really opt to start
with, say, Swahili or Korean?

> The best way to learn how to program is with a good teaching language.

His argument here doesn't make much sense. I think a "good teaching language"
is less about the language and more about the availability of teaching
material. The language semantics are trivial to pick up once you have a good
foundation, so why not focus on the foundation (and not the language), and
pivot as you like afterwards?

> There is no better way to learn about object-oriented programming (OOP).

I'm going to call shenanigans on this one. Learning good OO design isn't going
to magically come as a consequence of learning _any_ language, and smalltalk
being the paragon (supposedly) is a silly notion. Tons of languages have
delivered new paradigms as a result. By this argument, we should just learn
every language as our "first" language to learn concurrent/functional/low-
level/etc concepts best

> It’s a great hobbyist language.

It depends on your hobby! If you like making console games, uhhh you're shit
out of luck with small talk aren't you. Or what if you enjoy experimenting
with large datasets. Do you really want to work with a smalltalk-to-tensor
flow API?

For the record, I'm not saying OP can't learn smalltalk. Just that in being
defensive, it's not good to pendulum to prescriptivism.

~~~
fractallyte
Smalltalk is more akin to Latin, which is a fine choice for learning the
foundation of European languages.

Its simple syntax, within a logical and consistent language, makes it (in my
opinion) the best way to pick up OO concepts. Being highly 'visual' is
definitely an advantage that very few other languages can offer.

~~~
eesmith
In a human language analogy, I think Algol is Latin while Smalltalk is Greek.

~~~
jhbadger
But as an amateur classicist, although both Latin and (ancient) Greek were
once common teaching languages (and having a reading knowledge of them was
often s requirement to go to university as late as the 19th century), they
have quite fiddly grammars with lots of declensions which most modern Western
languages have streamlined away. Neither Smalltalk nor Algol have very
complicated grammars.

~~~
eesmith
I believe your argument is that there isn't a comparison between computer
languages and European languages.

I agree.

But if we stretch the analogy to try and make it work, then certainly Algol
was the de facto language used to publish algorithms, and it is the syntactic
basis of many widely-used modern languages.

As for the "fiddly grammars", etc., Algol 68 did not have a simple grammar.
Quoting Wikipedia's "Algol 68" page:

> ALGOL 68 has been criticized, most prominently by some members of its design
> committee such as C. A. R. Hoare and Edsger Dijkstra, for abandoning the
> simplicity of ALGOL 60, becoming a vehicle for complex or overly general
> ideas, and doing little to make the compiler writer's task easier, in
> contrast to deliberately simple contemporaries (and competitors) such as C,
> S-algol and Pascal.

and

> ALGOL 68 allows for every natural language to define its own set of keywords
> Algol-68. As a result, programmers are able to write programs using keywords
> from their native language.

Quoting Wikipedia's "For loop" page:

> Algol68 has what was considered the universal loop

allowing such constructs as

    
    
      FOR i FROM 1 BY 2 TO 3 WHILE i≠4 DO ...
    

and (quoting now
[http://courses.cs.vt.edu/~cs3304/Spring04/notes/Chapter-7/ts...](http://courses.cs.vt.edu/~cs3304/Spring04/notes/Chapter-7/tsld024.htm)
):

    
    
      for index := 1 step 2 until 50, 60, 70,
                     80, index + 1 until 100 do

~~~
jhbadger
Still, the grammar of Algol 68 is less complicated than most modern
programming languages and can be described in a couple of pages. It had to fit
on machines with trivial amounts of memory by today's standards, after all.
And it's said of Smalltalk that its grammar could fit on a postcard (somewhat
of an exaggeration, but not by much).

~~~
eesmith
Sure. But in the context of "X is to programming languages like Latin is to
European languages", X=Algol is certainly a better fit then X=Smalltalk.

I completely agree that the premise of the analogy is a stretch, and can
accept that people want to reject the premise (it's not _quite_ as bad as
"What kind of vegetable are you?"), but I don't see why fractallyte's claim
for Smalltalk is stronger.

------
_ph_
In my eyes, there is a small group of languages everyone should get familiar
with, who wants to understand the fundamental programming principles. It also
makes one understand how other language support those principles and how to
best use them.

Smalltalk certainly belongs to that group of languages (others would be
Scheme/Common Lisp). Smalltalk is the fundamental OOP language. Everything is
an object. Classes, numbers, booleans, all can have methods. Actually another
interesting property of Smalltalk is, that constructs like if/then or for
loops are just methods on the boolean and integer classes respectively.

Being dynamically typed, Smalltalk also does not force you into inheritance
just to satisfy a type signature. Java got that almost right with the
interfaces, unfortunately too many libraries rather require you to inherit
from a base class instead of implementing an interface - Go put that to
extremes by only offering interfaces but no inheritance.

Finally, Smalltalk is always integrated into some sort of IDE and class/object
browser, mostly doing image-based development.

So, even if one is never going to do a larger project in Smalltalk, I can only
recommend getting familiar with Smalltalk and its concepts, it changes the way
how one thinks about OOP in other languages too.

------
eesmith
"Old languages still have great value"

The author picked only those old language which still have great value.

The author did not include such languages as Algol, JOVIAL, MUMPS, SNOBOL, or
TRAC. There are a lot of old languages with little modern value. (Then again,
a lot of _new_ languages have little value.)

Since the author did not include COBOL, should I infer that "great value"
doesn't include "getting a job developing legacy systems"?

~~~
coldtea
What the author tried to convey by "old languages still have great value" is
that:

"Old languages shouldn't be discarded as valueless just because they're old.
Some old languages have great value".

And not:

"Any old language still has great value".

[https://en.wikipedia.org/wiki/Principle_of_charity](https://en.wikipedia.org/wiki/Principle_of_charity)

~~~
eesmith
Point taken. I think, however, that it's at least somewhat of a strawman
argument. The argument is "Why learning Smalltalk can never be a waste of
time" and #6 is "Old languages still have great value", concluding that "When
did “old” ever become a liability, as many opine?"

But how many people really say that Smalltalk is a waste of time because it's
an old language? My experience is that it's not a common argument against
learning Smalltalk.

That said, I also object to the use of the starting dates as the date for the
language when, for example, the C language from the 1970s is _not_ "very
commonly used for systems programming" \- at the very least that should be
ANSI C.

Similarly, I know it's not useful to study the Python of its first release for
anything other than historical interest. For one, the __init__ convention
hadn't yet been created, so objects were initialized manually.

~~~
coldtea
> _But how many people really say that Smalltalk is a waste of time because it
> 's an old language?_

I think a lot of people in the industry, especially younger ones in startups
and fad-driven cultures, tend to discard older languages with similar
criteria.

Not just Smalltalk, even something like Java -- "people still use that?".

~~~
eesmith
I still think the argument "Learning Smalltalk is not a waste of time because
people are wrong when they say that old languages aren't worth studying" is
missing a step in the logic.

------
ungzd
"Image" system might be too alien, this approach is very specific to
Smalltalk.

And when I tried to learn Pharo (which is probably implementation of smalltalk
best for learning today) I had impression that documentation is not very good,
and there are few good tutorials. There are some big and serious books, there
is Pharo MOOC, everything is so serious and academic that gives impression
that the language is hard. There's no simple stupid tutorial like in other
languages.

~~~
nyankosensei
If you download and run Pharo, a Welcome screen appears with a menu that
includes “Learn Pharo Smalltalk”. That leads to a simple interactive tutorial
called ProfStef that introduces you to Smalltalk syntax. There’s also a link
to a free introductory book called “Pharo by Example”.

------
mburney
I thought that Python is designed to be a teaching language.

~~~
fractallyte
Python has all the hype and popularity, but Smalltalk, Pyret, and Racket are
_far_ better choices.

~~~
r00fus
As a Smalltalk dev for a couple of years, I feel my biggest moments of
enlightenment were not with Smalltalk, but Scheme (i.e., Lisp) and (yes, not a
popular opinion) Javascript (Prototype-based language that eschewed rigid
class hierarchies).

I still love Smalltalk but it's elegance (message passing FTW) and purity set
a bar too high for me, and it still fell afoul of the fact that class
hierarchies create a syntax/behavior that require you to re-learn a lot every
time you join a new project (too many companies/projects rewired basic class
functionality).

------
b0rsuk
Can someone give me a concise explanation why a language this influential and
talked about is not used for regular programming ? What are its disadvantages
?

~~~
flavio81
> _Can someone give me a concise explanation why a language this influential
> and talked about is not used for regular programming ?_

Back in the late 70s and early 80s, to use it you required a system with very
big memory and fast processor speed (read: an expensive workstation), and the
implementations/compilers were mostly propietary and expensive as well. Same
reasons Lisp isn't more popular.

> _What are its disadvantages?_

There are really no disadvantages to Smalltalk. Although personally i'm not so
comfortable with a language that only allows message-passing OOP as its
paradigm; and Smalltalk is not the highest performing of languages. OTOH
Smalltalk, in 2017, should run substantially faster than some other popular,
well-liked programming languages such as Ruby.

