8

There is something I've never understood about Smalltalk, since reading about it in a book when I was a child, tho' I have never used it "in anger". I know that it is turtles-all-the-way-down, that you can break into the program at any time, inspect the state of your objects, even change the code, and resume running. This is obviously a dream come true for a researcher, whether in CS or in industry, an engineer simulating a system, an analyst modelling a market, and so on. I also know that there was no concept of writing source in text files and compiling them into a binary, the editor and the runtime are the same thing. But how do you deliver software to an end user who wouldn't know a debugger if it bit them on the nose, and couldn't care less what an object is? Was there a secret keystroke to turn all those features off and make it behave like "normal" software? Or was Smalltalk software only ever sold to sophisticated users who were programmers too?

8
  • 6
    How is this "opinion based"? Surely there are people who have actually done this, who can explain how it works?
    – Gaius
    Commented Jan 14, 2015 at 22:45
  • 1
    I don't get the reason to close. I don't think whether or not users were sophisticated is the key to this question, but more of a commentary.
    – JeffO
    Commented Jan 14, 2015 at 22:46
  • 2
    Can you cite a source? My understanding of Smalltalk is it's like a lot of other languages that have interactive tools like debuggers, IDE, and a REPL, that developers primarily work in, but can also compile standalone programs. Certainly most modern Smalltalk dialects work that way. Commented Jan 14, 2015 at 22:51
  • 1
    Am I the only one that doesn't understand this question??? Commented Jan 15, 2015 at 1:37
  • 1
    @KarlBielefeldt I think the source of confusion is that the original versions of Smalltalk (e.g. Smalltalk 80) weren't like that: the language was essentially a self-hosting operating system with integrated development tools, and no method AIUI of deploying a standalone application (the tools were an integral part of the OS). As most academic descriptions of Smalltalk focus on these early versions, most people aren't really aware of how the language evolved later.
    – Jules
    Commented Jan 16, 2015 at 14:25

3 Answers 3

16

Or was Smalltalk software only ever sold to sophisticated users who were programmers too?

No. It's the other way around: Smalltalk was designed so that every user can be a programmer, without needing to be sophisticated. In fact, Smalltalk was designed for children.

The basic idea is that a user would read a manual about the length of a middle-sized undergrad college textbook in order to use sophisticated machinery. Say, you are a carpenter and buy a CNC machine, you wouldn't expect to be able to use it right away, but you also wouldn't expect to need years to learn how to use it. You would probably expect to read about 10000 to 100000 lines of manual and learn about a couple of days to a couple of weeks.

For a software system, the ultimate manual is the source code. So, in order to be usable, the software system should consist of no more than 100000 lines of code, so that the user can read all of them. (And it should be written in such a way and such a language that she can understand it.) That's the goal of Smalltalk: the original Smalltalk system was about 60000 lines of code for everything, the "OS", the hardware drivers, the VM, the compiler, the interpreter, the IDE, the debugger, the editor, an office suite, a distributed document management system, etc. In the 1970s, that was the best they could do, today, 40 years later, we have much better languages available, and the replacement system and language(s) that Alan Kay's team are working on currently, is expected to be less than 20000 lines for the same feature set. (Compare that to e.g. Windows, which has 50 million lines.)

That was the idea. How well that idea worked, well … judge for yourself :-)

Modern Smalltalks try to make a distinction between development and deployment. Basically, you define some application root object, the system traces the connections between all objects in the system, and copies out only those objects which are directly or indirectly connected to the root application object, leaving you with a streamlined image that contains only the application and the libraries and frameworks needed by it.

You typically also don't edit the running system directly, but use some kind of version control system (e.g. Monticello) that stores your modifications as a series of semantic changes to the system and thus can be replayed on a different system. There is also research into module systems and package management systems, and most modern Smalltalks have at least one of the two.

So, the way that Smalltalk systems are deployed today is that there is some minimal "clean" image, and you apply CVS changesets or install packages or link modules on top of that, which yields an image which is specialized just for that application. If you want to do development, you start with a development image which includes the editor, compiler, IDE, etc. and apply those same changes on top of that.

The languages that came after Smalltalk (e.g. Self, Newspeak) often included a textual serialization format for code (Smalltalk itself doesn't have syntax for classes or methods, because they are created programmatically by the IDE (e.g. creating a class is actually just calling the subclass method on some class which will return a class which is a subclass of the class the method was called on); it only has syntax for expressions and statements.), that could be used to "file in" classes and methods into the system, and modern Smalltalks also have that capability.

1
  • 1
    "Smalltalk was designed so that every user can be a programmer" meanwhile at my Grandma's: "Sonny, my googles ain't workin' again!"
    – Alexander
    Commented Feb 19, 2016 at 5:37
3

One point that Jörg did not mention in his answer: After the "deployment" step it is actually hard to tell that an application was written in Smalltalk, because the IDE was either stripped out or hidden. For example, try these:

http://scratch.mit.edu/scratch_1.4/

http://www.planet-plopp.com/english/download.html

Also, just by looking at the range of applications built with Smalltalk, you can tell that their users are certainly no programmers nowadays: https://twitter.com/hashtag/thingsPeopleBuiltWithSmalltalk

That every user should be able to modify their software is a Smalltalk idea that still has not made it to the mainstream (while many other of its ideas are commonplace nowadays - like GUIs or Object-Orientation).

6
  • 1
    Again, object-oriented programming is not an idea that came from Smalltalk. The term did, but the concepts came from Simula, which does it a very different way. In the years since Alan Kay coined the phrase, Simula-style OOP has taken over the world, and Smalltalk-style OOP (message passing, etc) has failed every time it was introduced in the marketplace of ideas. Commented Jan 16, 2015 at 13:45
  • 2
    I wouldn't call JavaScript or Objective-C or Python or Ruby a failure, exactly. Even the Java VM has invokedynamic now, which makes it support Smalltalk-style OOP for various languages running on top of it. Dynamic languages definitely are mainstream now and still on the rise, even if they may not be the most popular yet.
    – codefrau
    Commented Jan 16, 2015 at 17:25
  • 1
    JavaScript and Objective-C are both "successful" by riding the coattails of a popular platform. But nobody uses Obj-C outside the Apple ecosystem, and just look how popular other (Simula-style) OO languages that compile down to JavaScript are becoming. (I used the term "marketplace of ideas" for a reason. Monopolies play by different rules.) Ruby was a fad that was popular for a while, but that's fading now that people are learning (again) why message-passing OOP sucks. And Python has no support for "missing method" and no good mechanism to implement it, so is that really Smalltalk-style? Commented Jan 16, 2015 at 17:52
  • @Mason Wheeler, I'm not sure why you dismiss Ruby and message passing. Certainly, the concept of message-passing is done in modern operating systems, like Mach. Commented Dec 27, 2018 at 7:01
  • 1
    @MasonWheeler "Smalltalk style OOP (message passing, etc.) has failed every time it was introduced in the marketplace of ideas." Are Objective C, macOS UI, and iOS failures? Python? Microservices?
    – Jerry101
    Commented Dec 27, 2018 at 8:14
2

In the classic Smalltalk-80, there was a SystemTracer that we at Tektronix used to "strip" an image for deployment.

Basically, it performed a full traversal of the system from a single specified point, excluding the global SystemDictionary and its contents.

This way, you could run SystemTracer on your application (typically, a Contoller subclass), and it would drag everything else in with it, but not stuff like Context or other classes and distinguished objects that were not involved in the operation of your application.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.