VisualWorks - String and Files

String and Files

Cincom's first tutorial on VisualWorks illustrates how VisualWorks can be used to manipulate server log files. It illustrates how things like strings and files can be easily subsumed into the object structure within VisualWorks. Consider the Smalltalk expression:

'ws000101.log' asFilename edit

One can evaluate this expression as-is in a VisualWorks workspace using one command in the operate menu. This creates:

  1. An object of class ByteString containing the string (as bytes) and the methods for manipulating it;
  2. An object of class NTFSFilename (in Windows XP); and
  3. An editor object.

The latter is a simple notebook-like editor containing the contents of the file. That is, the evaluation created a filename object as a gateway to the file ws000101.log and opened an editor onto it. The editor itself is an object, as are all its components (down to and including the characters in its menus). The source code is available for all these objects, and VisualWorks has a plethora of inspectors, browsers, and other tools for anyone to evaluate and inspect the code in static or dynamic mode.

Read more about this topic:  VisualWorks

Famous quotes containing the words string and/or files:

    As I came home through the woods with my string of fish, trailing my pole, it being now quite dark, I caught a glimpse of a woodchuck stealing across my path, and felt a strange thrill of savage delight, and was strongly tempted to seize and devour him raw; not that I was hungry then, except for that wildness which he represented.
    Henry David Thoreau (1817–1862)

    Here files of pins extend their shining rows,
    Puffs, powders, patches, bibles, billet-doux.
    Alexander Pope (1688–1744)