Have I summarized this correctly?

Smalltalk doesn't support the concept of enumerated types like in Java 5 and above. Instead, the Smalltalk way is to:

  1. create a class that represents the enumerated type
  2. add a class variable for each enumerated value (must start uppercase)
  3. add a class-side initialize method that creates an instance of the class for each enumerated value using basicNew and assigns it the corresponding class variable
  4. prevent creation of additional instances by overiding the class method new with "self error: 'new instances cannot be created'"
  5. add class-side getter method for each enumerated value that simply returns it

Here's an example ColorEnum class.

Object subclass: #ColorEnum
  instanceVariableNames: ''
  classVariableNames: 'Blue Green Red'
  poolDictionaries: ''
  category: 'SomeCategory'

initialize
  Red := self basicNew.
  Green := self basicNew.
  Blue := self basicNew

new
  self error: 'new instances cannot be created'

red
  ^Red

green
  ^Green

blue
  ^Blue

---
Mark Volkmann