Skip to the content.

Chapter 39: Beyond Smalltalk - Taking Your Skills Further

You’ve mastered Smalltalk! You understand objects, messages, blocks, classes, tools, and the community. But your programming journey doesn’t end here. The concepts you’ve learned in Smalltalk will make you a better programmer in any language.

This chapter explores how Smalltalk concepts apply elsewhere, which languages to learn next, and how to translate your Smalltalk thinking to other paradigms. Smalltalk taught you to think differently - now use that superpower everywhere!

What Smalltalk Taught You

Core Concepts (Universal)

  1. Everything is an object
    • Object-oriented thinking
    • Encapsulation and abstraction
    • Message passing vs function calls
  2. Polymorphism
    • Duck typing
    • Protocol-based programming
    • Flexible, composable code
  3. Blocks and closures
    • First-class functions
    • Functional programming concepts
    • Higher-order functions
  4. Live programming
    • REPL-driven development
    • Interactive exploration
    • Fast feedback loops
  5. Design patterns
    • Strategy, Command, Observer
    • Template Method, Composite
    • Elegant solutions to common problems
  6. Test-driven development
    • Write tests first
    • Red-green-refactor
    • Confidence in changes
  7. Refactoring
    • Continuous improvement
    • Small, safe changes
    • Code as living document

These concepts transcend languages!

Smalltalk’s Influence

Smalltalk influenced almost every modern language:

Direct Influence

Ruby - Borrows heavily from Smalltalk:

# Ruby
5.times { puts "Hello" }
[1, 2, 3].each { |n| puts n }

Very Smalltalk-like!

Python - List comprehensions, readability:

# Python
squares = [x**2 for x in range(10)]

Swift - Optional chaining, protocols:

// Swift
let length = person?.address?.street?.length

JavaScript - First-class functions, prototypes:

// JavaScript
[1, 2, 3].map(x => x * 2)

Indirect Influence

Even languages that don’t look like Smalltalk borrowed its ideas!

Translating Smalltalk to Other Languages

Python

Smalltalk:

collection select: [ :each | each even ]

Python:

[x for x in collection if x % 2 == 0]
# or
list(filter(lambda x: x % 2 == 0, collection))

Smalltalk:

collection collect: [ :each | each * 2 ]

Python:

[x * 2 for x in collection]
# or
list(map(lambda x: x * 2, collection))

Smalltalk classes:

Object subclass: #Person
    instanceVariableNames: 'name age'

Python:

class Person:
    def __init__(self, name, age):
        self.name = name
        self.age = age

Ruby

Smalltalk:

collection do: [ :each | Transcript show: each ]

Ruby:

collection.each { |item| puts item }

Smalltalk:

collection select: [ :each | each > 10 ]

Ruby:

collection.select { |item| item > 10 }

Ruby is closest to Smalltalk syntax-wise!

JavaScript

Smalltalk:

collection collect: [ :each | each * 2 ]

JavaScript:

collection.map(x => x * 2)

Smalltalk:

[ answer := 42 ] value

JavaScript:

(() => { return 42; })()

Smalltalk objects:

person := Person new name: 'Alice'.

JavaScript:

const person = new Person('Alice');
// or
const person = { name: 'Alice' };

Java

Smalltalk:

Object subclass: #BankAccount
    instanceVariableNames: 'balance'

Java:

public class BankAccount {
    private double balance;

    public BankAccount() {
        this.balance = 0.0;
    }
}

Smalltalk blocks:

list select: [ :item | item > 10 ]

Java (modern):

list.stream()
    .filter(item -> item > 10)
    .collect(Collectors.toList());

Java is verbose but getting better (lambdas since Java 8).

Swift

Smalltalk:

collection select: [ :each | each even ]

Swift:

collection.filter { $0 % 2 == 0 }

Smalltalk:

object ifNil: [ 'default' ] ifNotNil: [ object value ]

Swift:

object ?? "default"

Swift has excellent Smalltalk-inspired features!

Languages Smalltalkers Should Try

Ruby

Why:

Learn it if:

Get started:

# Install: ruby-lang.org
# Try:
puts "Hello, World!"
5.times { puts "Ruby!" }

Python

Why:

Learn it if:

Get started:

# Install: python.org
# Try:
print("Hello, World!")
for i in range(5):
    print("Python!")

JavaScript/TypeScript

Why:

Learn it if:

Get started:

// Install: nodejs.org
// Try:
console.log("Hello, World!");
[1, 2, 3].forEach(n => console.log(n));

Elixir

Why:

Learn it if:

Get started:

# Install: elixir-lang.org
# Try:
IO.puts "Hello, World!"
Enum.each([1, 2, 3], fn n -> IO.puts(n) end)

Lisp/Scheme/Clojure

Why:

Learn it if:

Get started:

; Install: clojure.org
; Try:
(println "Hello, World!")
(map #(* % 2) [1 2 3 4 5])

Rust

Why:

Learn it if:

Get started:

// Install: rust-lang.org
// Try:
fn main() {
    println!("Hello, World!");
}

Paradigms to Explore

Functional Programming

What:

Languages:

Smalltalk already taught you:

Next step:

-- Haskell
double x = x * 2
map double [1, 2, 3, 4, 5]

Logic Programming

What:

Languages:

Example:

% Prolog
parent(tom, bob).
parent(bob, pat).
grandparent(X, Z) :- parent(X, Y), parent(Y, Z).

?- grandparent(tom, pat).
true.

Very different from Smalltalk - expands thinking!

Concurrent Programming

What:

Languages:

Elixir example:

# Actor model - similar to Smalltalk message passing!
send(pid, {:message, "Hello"})

receive do
  {:message, content} -> IO.puts(content)
end

Systems Programming

What:

Languages:

C example:

// C
#include <stdio.h>

int main() {
    printf("Hello, World!\n");
    return 0;
}

Very different from Smalltalk - teaches fundamentals!

Concepts That Don’t Translate

Some Smalltalk features are unique:

Image-Based Development

Smalltalk:

Most languages:

Closest alternatives:

Live Debugging

Smalltalk:

Most languages:

Everything is an Object

Smalltalk:

3 + 4    "Message to object 3"
true ifTrue: [ ... ]    "Message to object true"

Most languages:

Ruby comes close:

3 + 4    # Message to object 3
5.times { puts "Hi" }    # Message to object 5

Message Syntax

Smalltalk:

object doSomethingWith: arg1 and: arg2

Most languages:

object.doSomethingWith(arg1, arg2)

Keyword messages are rare outside Smalltalk!

Transferable Skills

What works everywhere:

Object-Oriented Design

Every OO language uses these!

Test-Driven Development

Red (failing test)  Green (make it pass)  Refactor

Works in:

Design Patterns

Strategy, Observer, Command, etc.

Same patterns, slightly different implementations!

SOLID Principles

Universal good design!

Clean Code

Every language benefits!

Learning Strategy

For Your Next Language

  1. Understand the paradigm
    • Object-oriented?
    • Functional?
    • Mixed?
  2. Learn the syntax
    • Variables and types
    • Control flow
    • Function/method definitions
  3. Grasp the ecosystem
    • Package manager
    • Build tools
    • Popular libraries
  4. Build something
    • Todo list
    • Simple game
    • Web scraper
  5. Read others’ code
    • GitHub repositories
    • Open source projects
    • Learn idioms
  6. Compare to Smalltalk
    • How do blocks work here?
    • How do collections work?
    • What’s similar? Different?

Beginner → Intermediate:

  1. Python (practical, popular)
  2. JavaScript (web development)
  3. Ruby (similar to Smalltalk)

Intermediate → Advanced:

  1. A functional language (Elixir or Clojure)
  2. A systems language (Rust or Go)
  3. A statically-typed language (TypeScript or Kotlin)

Advanced → Expert:

  1. Haskell (pure functional)
  2. Lisp (code as data)
  3. Something weird (Prolog, Forth, APL)

Variety makes you versatile!

Appreciating Smalltalk More

After learning other languages, you’ll appreciate:

Smalltalk’s Simplicity

Smalltalk:

Most languages:

Smalltalk’s Interactivity

Smalltalk:

Most languages:

Smalltalk’s Elegance

Smalltalk:

collection
    select: [ :each | each > 10 ]
    thenCollect: [ :each | each squared ]

Java:

collection.stream()
    .filter(each -> each > 10)
    .map(each -> each * each)
    .collect(Collectors.toList());

Smalltalk is cleaner!

When to Use Smalltalk

Despite learning other languages, use Smalltalk when:

Best Fit

Consider Alternatives

Right tool for the job!

Contributing Your Skills

Bring Smalltalk Ideas Elsewhere

In Python projects:

In Ruby projects:

In Java projects:

In JavaScript projects:

Be the Smalltalk evangelist!

Teaching Others

Share what you learned:

Smalltalk made you a better teacher!

The Polyglot Programmer

Don’t be monolingual!

Benefits of knowing multiple languages:

Smalltalk + Python + JavaScript = Well-rounded!

Try This!

Expand your horizons:

  1. Pick a Language
    • Choose from recommendations
    • One that interests you
  2. Rewrite a Smalltalk Project
    • Todo list from Chapter 31
    • Compare implementation
    • Note differences
  3. Learn a New Paradigm
    • Try functional programming
    • Or logic programming
    • Expand your thinking
  4. Contribute to Open Source
    • Find project in new language
    • Fix a small bug
    • Learn by doing
  5. Read Classic Books
    • “Structure and Interpretation of Computer Programs” (Scheme)
    • “The Pragmatic Programmer” (language-agnostic)
    • “Clean Code” (Java, but applicable everywhere)
  6. Join New Communities
    • Reddit r/python, r/ruby, etc.
    • Discord servers
    • Learn community culture
  7. Build Something Cross-Language
    • Smalltalk backend + JavaScript frontend
    • Python for ML + Smalltalk for visualization
    • Experiment with integration

What You Learned

Looking beyond Smalltalk, you’ve discovered:

  1. Smalltalk’s Influence
    • Shaped modern languages
    • Contributed key concepts
    • Design patterns originated here
  2. Translation Skills
    • How to map Smalltalk to others
    • Similar concepts, different syntax
    • Finding equivalents
  3. Language Recommendations
    • Python (practical)
    • Ruby (similar)
    • JavaScript (web)
    • Elixir (functional)
    • Rust (systems)
  4. Paradigms to Explore
    • Functional programming
    • Logic programming
    • Concurrent programming
    • Systems programming
  5. Universal Concepts
    • OOP principles
    • TDD
    • Design patterns
    • Clean code
    • SOLID principles
  6. Learning Strategy
    • Understand paradigm
    • Learn syntax
    • Build projects
    • Read code
    • Compare to Smalltalk
  7. When to Use What
    • Smalltalk for prototyping, teaching
    • Python for data science
    • JavaScript for web
    • Right tool for job

The Journey Continues

You learned Smalltalk, but the adventure doesn’t end!

Keep learning:

Keep building:

Keep sharing:

Programming is a lifelong journey!

Looking Ahead

You now understand how to take Smalltalk skills elsewhere! You know:

In Chapter 40, the final chapter, we’ll reflect on Your Smalltalk Journey and discuss where to go from here!

You’ve come so far - let’s celebrate your achievement!


Key Takeaways:


Previous: Chapter 38 - The Smalltalk Community Next: Chapter 40 - Your Smalltalk Journey