Smalltalk Online Compiler
Smalltalk is the language that made object-oriented programming a real thing. Alan Kay and his team at Xerox PARC built it in the 1970s, and almost every OOP concept you use today -- classes, inheritance, message passing -- traces back to Smalltalk's design. In Smalltalk, everything is an object. Numbers, strings, booleans, even blocks of code. You don't call methods; you send messages to objects, and the object decides what to do with them.
Why use a Smalltalk online compiler?
Traditional Smalltalk environments like Pharo and Squeak ship as full-blown image-based IDEs. That's great for serious projects, but it's heavy when you just want to test a quick idea or show someone how message passing works. A Smalltalk online compiler gives you a lightweight way to write and run Smalltalk code without downloading anything.
It's especially handy for:
- Trying out syntax if you're coming from a C-family language
- Teaching someone how Smalltalk's message passing differs from method calls
- Checking how a particular expression evaluates before putting it into a larger Pharo project
Message passing in action
Here's a short example that shows Smalltalk's three types of messages -- unary, binary, and keyword:
| greeting size |
greeting := 'Hello from Smalltalk'.
size := greeting size.
Transcript show: 'Message: ', greeting; cr.
Transcript show: 'Length: ', size printString; cr.
"Keyword message with multiple arguments"
| result |
result := greeting copyFrom: 1 to: 5.
Transcript show: 'First five chars: ', result; cr.
Notice how size is a unary message sent to the string, , is a binary message for concatenation, and copyFrom:to: is a keyword message. This syntax looks unusual at first, but once you get the pattern, it reads almost like English.
Running Smalltalk on OneCompiler
OneCompiler gives you a straightforward editor with Smalltalk support. Type your code, hit run, see output. No image files, no VM setup. It works well for exploring Smalltalk basics -- understanding how objects respond to messages, how blocks work, and how the class hierarchy fits together.
If you're studying Smalltalk or just curious about the language that started it all, this is the fastest way to get your hands on it.
Try it here: Smalltalk Online Compiler on OneCompiler