mirror
Factor handbook » The language » Objects » Mirrors

Next:<mirror> ( object -- mirror )


Vocabulary
mirrors

Class description
An associative structure which wraps an object and presents itself as a mapping from slot names to the object's slot values. Mirrors are used to build reflective developer tools.

Mirrors are mutable, however new keys cannot be inserted, only values of existing keys can be changed. Deleting a key has the effect of setting its value to f.

Mirrors are created by calling <mirror> or make-mirror.

Definition


Methods