Virtualization is in vogue right now as companies use such technology to run multiple systems on consolidated hardware. Remember, Smalltalk was designed as a language and an environment. No one is about to replace Windows (or Ubuntu, though I'm tempted) with Smalltalk as their operating system, so it makes sense for it to be implemented as a virtual machine.
Similar to products like VMWare Workstation or VirtualBox, most Smalltalk implementations consist of a Virtual machine (VM) application and an image file. The image file contains the definition and state of the Smalltalk environment which is realized by the VM. It may be helpful to think about the image file as a program saved somewhere on your computer's hard drive, and the VM is your computer's processor that executes the code to do something useful.
A Squeak installation consists of four files: a VM executable and three files that make up the image.
As with most things in life there are advantages and disadvantages with image-based imperative programming. Apparently though the disadvantages outweigh the advantages. The latest standardization attempt of Smalltalk, ANSI/INCITS 319 1998 (ANSI Smalltalk), does away with the old model and specifies a fully declarative model for writing Smalltalk programs. Some reasons for adopting the new model were:
I did a quick screen recording to show what writing code in the environment is like. In Squeak, the programmer writes the code for a class and its methods directly in the System Browser window. At the top of the window are selection lists; from left to right, they list class categories, classes, method categories, and methods. Below them is a text area where the code is typed and saved. When the code is saved, Squeak automatically compiles it and makes it available to the rest of the system.
Similar to products like VMWare Workstation or VirtualBox, most Smalltalk implementations consist of a Virtual machine (VM) application and an image file. The image file contains the definition and state of the Smalltalk environment which is realized by the VM. It may be helpful to think about the image file as a program saved somewhere on your computer's hard drive, and the VM is your computer's processor that executes the code to do something useful.
A Squeak installation consists of four files: a VM executable and three files that make up the image.
- The VM is the interpretor that "runs" a Smalltalk image.
- The .sources file contains the core Squeak system and base libraries.
- The .image file contains the current state of the running system.
- The .changes file is contains a log of changes made to the system.
As with most things in life there are advantages and disadvantages with image-based imperative programming. Apparently though the disadvantages outweigh the advantages. The latest standardization attempt of Smalltalk, ANSI/INCITS 319 1998 (ANSI Smalltalk), does away with the old model and specifies a fully declarative model for writing Smalltalk programs. Some reasons for adopting the new model were:
- Programs could be inaccessible if the image becomes out dated or corrupted.
- Because the same image is used for development and production, is makes it very difficult to support situations where the development and target execution environments must be different (security restrictions, for example).
I did a quick screen recording to show what writing code in the environment is like. In Squeak, the programmer writes the code for a class and its methods directly in the System Browser window. At the top of the window are selection lists; from left to right, they list class categories, classes, method categories, and methods. Below them is a text area where the code is typed and saved. When the code is saved, Squeak automatically compiles it and makes it available to the rest of the system.
Comments
Post a Comment