Smalltalk

Introduction

This was adapted from http://www.squeak.org/Smalltalk.

Resources

Reasons some people like Smalltalk

  1. small, consistently applied syntax
  2. great development environment consisting of tools such as System Browser, Workspaces, Transcript, Debugger, Hierarchy Browser, Method Finder and more
  3. everything is an object
  4. automatic version control
  5. extreme polymorphism - can pass any kind of object to a method as long as it responds to the messages that will be sent to it

Reasons some people dislike Smalltalk

  1. It isn't as popular as many other programming languages.
  2. It doesn't minimize compile-time errors as much as statically typed languages such as C++, C# and Java. However, it does do incremental compiling when methods are saved so it finds syntax errors before runtime, unlike most scripting languages
  3. All the code for a project is stored in one big image file (15+ MB).
  4. The syntax is fairly different from most programming languages.
  5. Performance ... although VisualWorks Smalltalk is almost twice as fast as Python which is faster than Perl which is faster than Ruby.
  6. Classes are not in a namespace, so all class names must be unique. Using class name prefixes is recommended. Squeak has a prefix registry in the wiki.

Topics

Abstract Classes and Methods

This concept is not directly supported in Smalltalk. A method is essentially abstract if it returns "self subclassResponsibility". A class is essentially abstract if it contains any abstract methods.

Mouse Buttons

In Smalltalk development environments the mouse buttons are referred to as red, yellow and blue. These are mapped differently under different OSes. The mappings are summarized in the table below.

Button Linux/UNIX Mac OS X Windows
red left
yellow option-click or wheel-click
blue cmd-click or right