Search code examples
variablessmalltalksqueak

Create New Pseudo Variables in Squeak


Large part of squeak is implemented using squeak itself. I am curious to know if pseudo variables such as self or true are also implemented using squeak. If the answer is yes, where the implementation located?

Specifically, assume that I want to add new subclass of "Boolean" called "Other" which will represent a third option: neither true nor false. I want that other, the only instance of Other to be similar to the true/false global singletons.

Any ideas? Thank you.


Solution

  • Make it a global:

    Smalltalk at: #other put: Other new